1. Computing & Technology

Discuss in my forum

<!-- --> 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:

©2012 About.com. All rights reserved.

A part of The New York Times Company.