HTML : Comments

5:53:00 PM | ,



Comments

You can put comments between any tags in your XHTML documents. Comments use the following syntax:
<!-- comment goes here -->
Anything after <!-- until the closing --> will not be displayed. It can still be seen in the source code for the document, but it is not shown onscreen.
It is good practice to comment your code, especially in complex documents, to indicate sections of a document, and any other notes to anyone looking at the code. Comments help you and others understand your code.
You can even comment out whole sections of code. For example, in the following snippet of code you would not see the content of the <h3> element. You can also see there are comments indicating the section of the document, who added it, and when it was added.

<!-- Start of Footnotes Section added 04-24-04 by Bob Stewart -->
<!-- <h2>Character Entities</h2> -->
<p><strong>Character entities</strong> can be used to escape special
characters that the browser might otherwise think have special meaning.</p>
<!-- End of Footnotes section -->

0 comments: