HTML Comment are the text that will be ignored by the browser, Any text written inside the comment will not be displayed on the web page as output, text inside comment will only be visible in the text editor. Comments are useful for the programmers to understand the code for later use, and it also helps the other programmer to understand the code easily. Comments can also be useful for providing any reminders.
Example 1: HTML Comment can be written as:
<html> <body> <!-- This is a HTML Comment. Any text written inside this tag will not be displayed on the web page. It can goes on multiple lines. --> <p>This is a paragraph and it will be visible.</p> </body> </html>