mozilla

Revision 399461 of Comment

  • Revision slug: Web/API/Comment
  • Revision title: Comment
  • Revision id: 399461
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 24 words addedDOM/Comment Web/API/Comment

Revision Content

A comment is used to add notations within markup; although it is generally not displayed, it is still available to be read in the source view (in Firefox: View -> Page Source).  These are represented in HTML and XML as content between <!-- and  --> . In XML, the character sequence "--" cannot be used within a comment.

A comment has no special properties or methods of its own, but inherits those of CharacterData (which inherits from Node).

Specification

Revision Source

<p>A comment is used to add notations within markup; although it is generally not displayed, it is still available to be read in the source view (in Firefox: View -&gt; Page Source).  These are represented in HTML and XML as content between <code>&lt;!--</code> and  <code>--&gt; . </code>In XML, the character sequence "--" cannot be used within a comment.</p>
<p>A comment has no special properties or methods of its own, but inherits those of <a href="/En/DOM/CharacterData" title="En/DOM/CharacterData">CharacterData</a> (which inherits from <a href="/en/DOM/Node" title="en/DOM/Node">Node</a>).</p>
<h3 id="Specification">Specification</h3>
<ul> <li><a class=" external" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1728279322" rel="freelink">http://www.w3.org/TR/DOM-Level-3-Cor...#ID-1728279322</a></li>
</ul>
Revert to this revision