Login | Contact Us | Site Map | Resources

Introduction to HTML

Home > HTML Tutorial > HTML Comments

HTML Comments

Comments are useful in HTML for two main reasons:

1. Writing Notes/Reminders to Yourself Inside of HTML Files
2. Temporarily Hiding Elements/Tags While Testing An HTML File

HTML comments will be ignored by the browser, although they can be viewed in the source code.

Each comment begins with <!-- and ends with -->. Complete HTML elements can be contained within these tags.

  <title>My Very First Webpage</title>
    <!-- How do you know when there is an elephant under your bed? -->
    <!-- When your nose touches the ceiling! -->
    <!-- <p>(This will not show up on your webpage.)</p> -->