HTML Tag Reference - HTML tag <!--...-->








<!--...--> is the comment tag used to insert comments in the source code.

This construct encloses text comments that will not be displayed by the browser.

The comment may be used for informational messages for developers.

We can also use comment to mask content from user agents that do not support a particular technology.

No attributes or events are associated with this construct.

Browser compatibility

<!--...--> Yes Yes Yes Yes Yes

What's new in HTML5

None.





Global Attributes

The comment tag does not support any standard attributes.

Event Attributes

The comment tag does not support any event attributes.

Example

<!DOCTYPE html>
<html>
<body>

<!-- This is a comment -->
<p>This is a paragraph.</p>

</body>
</html>

Click to view the demo