HTML comments allow web developers to document DOM structure, label major page sections (e.g. headers, main content, footers), and temporarily disable elements during local debugging without deleting markup.

HTML Comment Syntax Examples

index.htmlhtml
<!-- Single-Line Header Section Comment -->
<header class="site-header">
    <h1>Lynxbee Developer Platform</h1>
</header>
 
<!-- 
Multi-Line Comment:
Temporarily disabling promotional banner during local development
<div class="promo-banner">Special Discount</div>
-->
 
<main>
    <!-- Section: Core Articles -->
    <article>Content here</article>
</main>