Skip to content
Justice Tech School

HTML Comments

A comment starts with <!-- and ends with -->. The browser does not show it. Use comments to leave notes for yourself or to temporarily switch off a piece of code.

Remember that comments are still visible to anyone who views the page source, so never put secrets in them.

Example
<p>You can see this.</p>
<!-- <p>You cannot see this.</p> -->
<p>You can see this too.</p>

Exercise

Close the comment.

<!-- A note >

Quiz Test

Who can see HTML comments?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.