HTML Comments

HTML Comments (<!-- comment text -->)

The HTML comments is used for creating comments within your HTML code.

Comments aren't displayed in the browser, they are used for the programmer's understanding.

Technically, the comment tag is used to provide developers with a way to comment their code without it being rendered on the page. Therefore, there are no attributes available for the comment tag.

Syntax

<!-- User comments/notes -->

Example

Try Yourself

Usage of comments

Developer can write notes about the changes, because if any new developer come they should know all the details.

Example

Try Yourself