<htmlstart/>

HTML Comments

HTML comments are invisible to visitors but useful for developers.

Comment Syntax

HTML comments start with <!-- and end with -->. Everything between is ignored by the browser.

<!-- This is a comment —  the browser ignores it -->

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

<!-- TODO: add contact form here -->

Multi-line Comments

<!--
  Author: Jane Doe
  Last updated: 2025-01-01
  This section contains the main hero banner.
-->
<section class="hero">
  <h1>Welcome</h1>
</section>

Commenting Out Code

Comments are great for temporarily disabling HTML without deleting it:

<!-- <p>This paragraph is hidden for now.</p> -->
<p>This one shows.</p>
Comments are visible in browser DevTools and page source — never put passwords, API keys, or sensitive info in HTML comments.