HTML Comments
Comments are the part of code which is ignored by any web browser or simply not displayed in the webpage. It is a good practice to add comments into your HTML code, especially in large and complex documents. Comments help you and other to understand the code.
Here is the syntax of writing comment:
Syntax:
<!-- This is a html comment -->
Example of HTML Comment
Here is an example for html single-line comment.
Example:
<!-- This is a comment for the paragraph -->
<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p>
<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p>
Run Example
Here is an example for html multi-line comment.
Example:
<!-- This is a paragraph.
This is an example of multiline comment.
This is an example of multiline comment. -->
<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p>
This is an example of multiline comment.
This is an example of multiline comment. -->
<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p>
Run Example