Prev Next

HTML Comments

  • Comments are used to enter some text or phrases in the html file.
  • The contents of the comments are not displayed on the webpage.
  • The main usage of the comments is to help the HTML designer in the future.

Example of comment

<!-- Write your comments here -->

Notice that there is an exclamation point (!) in the start tag, but not in the end tag.

<!-- This is a comment -->

<p>This is a paragraph.</p>

<!-- Remember to add more information here -->