Menu Close
HTML Tutorial

HTML Comments

The HTML Comments tag is used to insert the comments on the HTML source code. 

It is very useful for programmers to understand the codes and to remove errors. The browsers will not display the comments section. 

Also we can hide the texts from the middle of the content. Follow the below example to learn about html comments.

Example

<html>
<head>
<title>Hide inline content</title>
</head>
<body>
<!-- This is a comment -->
<p>This is a paragraph</p>
<p>This <!-- Hide inline content --> is a paragraph</p>
</body>
</html> 

Output:

Hide-inline-content
Popular HTML Blogs