Skip to content
techsnow

Semantic HTML

Comments

Comments are notes in your code. The browser ignores them, so they never appear on the page.

Syntax:

<!-- This is a single-line comment -->

<!--
  This is a
  multi-line comment
-->

<!-- <p>This paragraph is hidden for now.</p> -->
  • Explain why a tricky piece of code exists.
  • Mark the start and end of big sections.
  • Temporarily hide code while testing.