The HTML comments are used to indicate sections of a document or insert any notes explaining the code. They help you and others understand the code and increases its readability. The comment tag can also be used to exclude temporary code blocks instead of deleting them.
For defining HTML comments we use the <!-- ... --> tag. The browsers ignore this tag and do not show its content to the users.
Comments are written between <! and --> symbols.
<html> <head> <title>The title of the document.</title> </head> <body> <h1>The main heading</h1> <!-- <p>We want to hide this part of the code temporary. </p> --> <a href="https://www.w3docs.com">Homepage</a> <!-- <p>This is a link to the homepage</p> --> </body> </html>