HTML Comments

HTML Comments are not rendered by browsers. They serve to present an additional information to the programmer.

Example

The following example demonstrates how HTML Comments are used.

index.html

Note that a HTML comment starts with a left angular bracket, then an exclamation mark followed by two hyphens. No space between these characters. Then we write the comment and close the comment by writing two hyphens followed by right angular bracket.

ADVERTISEMENT

Usage of HTML Comments

Comments are usually kept at places to provide an information to self or other users/developers.

In the following example, there is a simple comment about paragraph.

index.html