HTML Comments
HTML comments are not visible when rendered in the browser, yet they serve as valuable to explain html code
HTML Comment Tag
You can add comments to your HTML code by using the following method:
Add Comments
Comments can help us write reasoning or explanations of the code, which aids in better understanding the code in the future.
Hide Content
HTML comments can be used to hide content so that it won't be visible on the website, but the hidden information remains in the code.
comments are valuable for debugging HTML. You can comment out specific lines of HTML code one by one to identify and locate errors in your code.
Hide Inline Content
You can use comments to hide parts of HTML code.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<!-- This paragraph shows our info -->
<p>Proper Tutorial is a website</p>
<!-- you can add more information here -->
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>This is a paragraph.</p>
<!--
<p>Look at this cool image:</p><img border="0" src="pic_trulli.jpg" alt="Trulli">
-->
<p>This is a paragraph too.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>This
<!-- great text --> is a paragraph.
</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>This is a paragraph.</p>
<!--
<p>This text will be hidden</p><img border="0" src="pic_trulli.jpg" alt="Trulli">
-->
<p>This is a paragraph too.</p>
</body>
</html>