HTML Comments

HTML Comments

HTML Comments

HTML Comments are used to explain the logic of HTML code what we have written and why we have written.

  • It also improves the readability of the HTML code.

  • Browser ignores the HTML comment and it does not show on the web page. It is only visible in source code.

  • HTML Comments is defined by <!-- comments here --> tag.

Example:
<!-- <h2> tag is used to give heading | This is the Comment-->
<h2>Heading of Page</h2>
Run Code »
Example Explanation:

In the above, we have shown an example of HTML Comments.

  • Comments are not visible on the web page, it is only visible in the HTML document and it is used to give the logic and basic functionality of the HTML code.

Run the code to see the effect.




HTML Comments in Hindi

Best Use:360p or more (480p or 720p)
×

Course Menu