In HTML, comment tags are used to insert comments in HTML code. That can't be executed it's just human-readable.


<!-- 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.


<!DOCTYPE html>
        <p>This is a paragraph.</p>
        <!-- <p>This is a paragraph.</p>-->
        <!-- Comment -->