An HTML comment is text stored in an HTML file that the web browser skips, so it does not appear in the rendered page. Comments act like sticky notes attached to your code. section 16.6
Use comments to:
- Leave notes for yourself, such as where the logo will go. section 16.6
- Explain the purpose or boundaries of a page section. section 16.6
- Temporarily skip problematic text, tags, or unfinished links. section 16.6
- Add copyright notices or other information for people viewing the HTML source. section 16.6
Comment syntax
Place the comment text between <!-- and -->. For example: <!--This text is a comment-->. The browser hides it from the rendered page, but anyone viewing the page source can read it, so never put sensitive information inside a comment. section 16.6
<!--This text is a comment-->
Inspect the compact form of an HTML comment. section 16.6
Marking page structure
Comments can label larger regions without changing the page: <!--START OF HEADER--> marks the beginning of a header, while <!--END OF HEADER--> marks its end. Uppercase lettering makes these labels stand out, but it is optional. section 5.5









