[Home]Comments in HTML

HomePage | RecentChanges | Preferences | Newbie Help

HTML Basics

In HTML, a comment begins with "<!--", ends with "-->" and does not contain "--" or ">" anywhere in the text of the comment (because some browsers may see "--" or ">" as the end of the comment). Putting HTML markup inside comments is chancey, and should be avoided.

Example:

   <p>End of Section 1.</p>

   <!-- Next section needs illustrations -->
   <h2>Section 2: Data Input</h2>
<!-- 
   Show input screens here.
   Use screen captures, full-sized, cropped.
-->
   <p>A standard set of input screens guides you through....

Note that comments are not allowed within tags, i.e. inline between "<" and ">".

Generally, using comments to "comment out" code is not a good idea. It easily strikes back. It's better code to actually remove the code, saving the old version as backup when needed.


Comments --
HomePage | RecentChanges | Preferences | Newbie Help
This page is read-only | View other revisions
Last edited January 26, 2002 7:03 pm (diff)
Search:

This FAQ is happily hosted by Betadome Digital Media