SyntaxStudy
Sign Up
HTML HTML Comments & Special Characters
HTML Beginner 1 min read

HTML Comments & Special Characters

HTML Comments & Special Characters

HTML Comments

Comments are notes in your code that browsers ignore. They help explain your code to other developers (or your future self).

Syntax: <!-- your comment here -->

HTML Entities (Special Characters)

Some characters have special meaning in HTML (like < and >). To display them literally, use HTML entities:

CharacterEntity
<&lt;
>&gt;
&&amp;
"&quot;
 &nbsp; (non-breaking space)
©&copy;
Example
<!-- This is a comment — not visible in browser -->
<p>Use &lt;p&gt; for paragraphs and &lt;h1&gt; for headings.</p>
<p>Company name &amp; logo &copy; 2025</p>
<p>Price:&nbsp;$99.99</p>