HTML Comment object
Prevents any enclosed text or HTML source code from being parsed and displayed.
![]() |
DOM Information
Inheritance Hierarchy
Node
HTML Comment
Members
The HTML Comment object has these types of members:
Properties
The HTML Comment object has these properties.
| Property | Description |
|---|---|
|
Retrieves or sets the text of the object as a string. |
Standards information
- HTML 4.01 Specification, Section 3.2.4
Remarks
Comments can contain other HTML elements. Comments do not nest.
Start and end tags are required.
Examples
The following is an example of an HTML Comment.
<!-- This text will not appear in the browser window. -->
See also
Show:
