Javascript AJAX jQuery HTML PHP Example MORE

HTML Comment tag with Example

In HTML Comment tags are used to insert comments in the HTML code.

HTML code written between comment tag can’t be execute.

Syntax:

<!-- Write your comments here -->

Advantages of comment

  1. It help others to understand what you are doing actually.
  2. Remind yourself of what you did .Some time we forget what we write before one year ago. So comment 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>

Run it yourself