1. Home
  2. Computing & Technology
  3. Web Design / HTML

<!- - - -> Comment

By , About.com Guide

Comment Tag Description:

The <!-- --> Comment tag is used to comment XHTML code - to add information to the page that is ignored by the browser.

Comment Tag Web Browser Support:
Comment Tag Attributes:

None

Comment Tag End Tag:

<!-- --> Both tags REQUIRED

Comment Tag Contents:

Any HTML tag or element is valid within the comment tags

Comment Tag Valid Context:

The comment tags are valid within the following tags:
all HTML tags

Comment Tag Usage:
  • It is not permitted to include multiple hyphens "---" in a comment.
  • Comments are best used to provide information about the page, especially when you are designing complex HTML documents.
  • While it is legal to comment HTML tags, be aware that some older browsers do not handle this functionality correctly.
Comment Tag Special Notes:
More <!-- --> Comment Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2010 About.com, a part of The New York Times Company.

All rights reserved.