Forum Moderators: mack
What I wanted to know is are there any real benefits from comments aside from what I noted above.
What are the disadvantages of them?
Should I use them sparingly?
Thanks in advance!
u4ea
High-speed internet access is still too young as a technology. The problem we have here is that it's not available in 70% of the localities and the small towns I can think of.
And cable access, depending again where you happen to live, I've heard that if your neighbor downloads tons of MP3's or things like that, he will slow down the whole street!
I remember seeing dirty jokes hidden in one site's HTML comments. That's a nice little Easter Egg.
HTML (done properly) can be a LOT easier to read than programming languages, so comments shouldn't be used nearly as much. A good way to work around the need for comments is to have critical portions of your site that normally would need to be commented because it's an endless labrynth of tables and nonsense code is best put into a separate file entirely and included on the server side rather than putting a "<!- Complicated Table Start ->" and "<!- Complicated Table End ->".
Plus, given the amount of work a small few people put into a website, usually comments are unnecessary except where you're doing something really, really obscure.
Some recommend commenting your CSS heavily, but if you have a global CSS file, then cut down page-specific CSS into a separate file included only on the pages that use it, you eliminate the need for that too. Only comment stuff that will be obscure or stuff that is used as a hack.