<!-- comment text -->

HTML4 HTML5

Allows inserting a comment into HTML code. The comment text will not be displayed on the page and has no impact on the page layout. The comment text is contained inside the comment tag.

Example

Code:

This is normal text visible on the page. <!-- We won't see this snippet. It is contained inside the comment tag -->The comment has ended and the text is displayed again.

The browser will interpret this code as follows:

This is normal text visible on the page. The comment has ended and the text is displayed again.