What is the use of comments and how to write comments in HTML.

Comments can be used in the code to give an explanation about the code, and it is not visible to the user. Comments are used to explain something about the code to the Programmer / Developer.

Comments in any code make code easy to understand and increase readability of code. In HTML the comment tag is used to insert comments in the source code. Comments are not displayed in the browsers.

Syntax to write Comment in HTML:

<! -- This is a Comment -->