HTML BasicsA Comment is a bit of text that appears in a document but is not displayed by the browser. Comments can be used to provide additional information about a document, to temporarily to mask from the reader a section of text (such as a section not yet completed), or just to help make the document more readable to the person handling the markup tasks.
There is no 'comment' element. Instead, HTML uses SGML's comment mechanism. In its simplest form a comment looks like this:
<!-- Everything between the first pair of hyphens and the next pair is a comment -->
Be careful however, because the rules are not quite that simple.
<! THIS IS NOT A COMMENT --But this is--> <!-- This is a comment -- THIS IS NOT A COMMENT --and this is comment-- >
It's not necessary to learn the actual syntax of comment construction;
just begin your comments with <!-- and end them with
--> and avoid pairs of hyphens within your
comments.; If you find that you can't avoid using multiple hyphens
in your comment, be sure that there is a 'closing' pair for every
'opening pair'.