DEV Community

Mertcan Yurttaş
Mertcan Yurttaş

Posted on

<!--…--> (Comment) Tag in HTML

<!--…--> (Comment) Tag in HTML

Everything between the <!--…--> start and end tags is referred to as a comment line in HTML. The browser ignores everything here and does not process it.

Its intended use may be for the developer to take reminder notes for himself, to leave an explanatory statement on a part of the code, or to make an explanation for other developers.

Code:
Comment line code view.

Output:
Comment line output view.

How to write a comment line in HTML?

To write a comment line in HTML, a <!-- tag is placed at the beginning of the section to be commented and a --> tag is placed at the end. The browser will not process anything between these two.

Code:
Comment line code view.

Output:
Comment line output view.

Top comments (0)