HTML Comment Tags
You can also add necessary comments to your HTML source by typing the following syntax:
Example
<!-- Write your comments here -->
you can also notice that there is an exclamation point (!) present in the opening tag, but not present in the closing tag.
Note: Comments will not be displayed by the browser, but they can help you document your HTML source code and have them organised.
With comments you can also keep notifications and reminders in your HTML source:
Example
<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Remember to add more information here -->
Comments can also be used for debugging HTML, because you can aslo be commenting out HTML lines of code, one at a time, inorder to search for errors:
Example
<!-- Do not display this at the moment
<img border="0" src="pic_mountain.jpg"
alt="Mountain">
-->
Conditional Comments
You might also come across conditional comments in HTML:
Example
<!--[if IE 8]>
.... some HTML here ....
<![endif]-->
Conditional comments defines some HTML tags to be executed by Internet Explorer only.