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 :

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

Demo :




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



0 comments:

Post a Comment