How do I comment an HTML document?

Place <!-- at the beginning of EACH line commented out; close this for EACH line with --> . Note that comments do not nest, and the sequence "--" may not appear inside a comment except as part of the closing --> tag.

You should not try to use this to "comment out" HTML that would otherwise be shown to the user, since some browsers (notably Mosaic) will still pay attention to tags inside the comment and close it prematurely.

Thanks to Joe English for clearing up this issue.


World Wide Web FAQ