H-129, Plari, Hodal, Palwal, HR
+91 9992755268

HTML 5 Comments

 

This element is used to add a comment to an HTML document. An HTML comment begins with <!–– and the comment closes with –– >. HTML comments are visible to anyone that views the page source code but are not rendered when the HTML document is rendered by a browser.

What are HTML Comments?

Advertisements. Comment is a piece of code which is ignored by any web browser. It is a good practice to add comments into your HTML code, especially in complex documents, to indicate sections of a document, and any other notes to anyone looking at the code.

<!-- comments in html -->
 
 < p> this is comment use  example  < /p>

<!-- this is p tag -->

HINT:-

Comments Don’t show on result page or in a web browser.

 

<Html>
 <head>
 <title> LearnPHPonline</title>
 </head>
 <body>
 <p> paragraph </p>  <!-- this is paragraph -->
 </html>

 

What is the use of comment tag?

The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers. 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.