HTML comments are not displayed in the browser, but they can help document your HTML source code.
Comments of any code make code easy to understand and increase readability of code.
Comments are also part of the code, which gives an explanation of the code.
In HTML, comments are used to add notes or explanations in the code without displaying them on the webpage. HTML comments are placed between <!-- and -->.
With comments you can place notifications and reminders in your HTML code:
Example:
<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Remember to add more information here -->
Example:
<!--
This is a multi-line comment.
It can span across several lines.-->