Home › Tutorials › HTML Tutorial › Comments
Comments

Comments


7. Comments

HTML comments are ignored by the browser and are useful for notes in code. They are not displayed on the page.

Syntax

<!-- This is a comment -->

Example

<!-- Main heading starts here -->
<h1>My Website</h1>

Output

Only the heading My Website is displayed.
Example

🏋️ Test Yourself With Exercises

Take our quiz on Comments to test your knowledge.

Browse Quizzes »