HTML Comment

HTML Comment

Mishel Shaji
Mishel Shaji

Comment is a part of the code which is not processed by the browser. Comments can be used for the following purposes. An HTML comment is placed within <!– and –> tags.

  • To write something about the code.
  • To prevent a part of code from being executed.
  • For debugging.


HTML comments are specified using the following tag:

<!-- This is a comment -->


    <title>HTML Comments</title>
    <!-- This is a comment -->
    <p>This is a paragraph.</p>
    <!-- <p>This will not be visible.</p> -->