HTML Comment Tag Example


The HTML comments are used to comment on HTML source code. when you add a comment on a particular part after that it will not show on a webpage. so you can see below the following syntax.

Syntax

The HTML comments begin with the <!-- the symbol and end with the --> symbol.

<!-- comments here -->
The Example Oneline
<!DOCTYPE html>
<html>
<body>

<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Comments are not displayed in the browser -->

</body>
</html>
The Example Multiline
<!DOCTYPE html>
<html>
<body>

<!-- <p>This is a paragraph.</p>
Comments are not displayed in the browser -->

</body>
</html>