comment tag in html with example

  1. The comment tag is used to insert comments in the source code.
  2. Comments are not displayed in the browsers.
  3. You can use comments to explain your code, which can help you when you edit the source code at a later date. This is especially useful if you have a lot of code.
  4. The comment tag is supported in all major browsers.

Example :

     <!--This is a Comment. Comments are not visible on browser.-->
     <p>This is my simple example for comment.</p>

Demo :

In the above example, we have used comment tag. The text inside the comment tag is not visible on browser. 


Post a Comment