Example

A simple comment tag <!--..-->:

Laboratory

description & Usage

The <!--..--> tag is used to add notes and remarks to the HTML document. The content of the comment tag is not displayed in the browser.

Generally, the comment tag is used for pages that have a lot of code.

The uses of the <!--..--> tag are:

  1. To provide an explanation for future edits about how the code works.
  2. To provide an explanation for other programmers about how the code works.
  3. When we want a code to not run for a specific time. Instead of deleting the code, we comment it out.

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
<!--..-->

Global Attributes

The <!--..--> tag not supports the HTML Global Attributes.

Event Attributes

The <!--..--> tag not supports the HTML Event Attributes.