Visit Mozilla.org

HTML:Element:comment

From MDC

Contents

[edit] HTML Comment Element

<!-- ... --> - The HTML Comment Element is used to designate text that is not displayed to the user. Comment tags may enclose just a few words or entire sections of pages. Authors should take care not to close the comment tag inadvertently. In particular, string of hyphens (---) should not appear inside comment tags.

[edit] Example

   <p>We had a great time on our Summer vacation. <!-- Tell 'em about
   the Grand Canyon here --> But it's really great to be back.</p>

[edit] Result

We had a great time on our Summer vacation. But it's really great to be back.

[edit] Note

HTML comments are visible to the end user via the browser's View Source feature, and therefore should not be used to hold sensitive information.

[edit] See also

HTML 4.01 Specification: Comments


HTML Elements
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
(Quick Links: HTML Element Cross Reference, HTML Category)