Advertisement
❮ Previous: HTML Phrase Elements Next: HTML Colors ❯

HTML Comments

The HTML comments are not be displayed by the browser. It may be used for informational messages for developers as well as to mask content from user agents that do not support a particular technology.


HTML Comment Tags

The following syntax:

<!-- Comment Goes Here -->

No attributes or events are associated with this construct.

Notes:


Singleline Comments

You can add single line comments.

Example

<!-- This is a comment -->

<p>Paragraph of the page.</p>

<!--p>This paragraph is commented.</p-->

Try this code ❯


Advertisement

Multiline Comments

HTML supports multi-line comments as well. You can comment multiple lines by the special beginning tag placed before the first line and end of the last line as shown in the given example below.

Example

<!-- This is multiline comment

<p>Paragraph of the page.</p>

-->

Try this code ❯


A complete list of all HTML tags, see HTML Tag Reference.

❮ Previous: HTML Phrase Elements Next: HTML Colors ❯
Advertisement