In HTML, comment tags are used to insert comments in HTML code. That can't be executed it's just human-readable.
Syntax:
<!-- Write your comments here -->
Why we use the comment?
- It helps others to understand what you are doing actually.
- Remind yourself of what you did. Sometimes we forget what we write before one year ago. So comments help us to know about that particular code.
Example:
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<!-- <p>This is a paragraph.</p>-->
<!-- Comment -->
</body>
</html>