Web Analytics

HTML Entities

Intermediate ~8 min read

What are HTML Entities?

HTML entities are special codes used to display characters that:

  • Are reserved in HTML (like < and >)
  • Are not on your keyboard
  • Might not display correctly

Entities start with & and end with ;

Reserved Characters

These characters have special meaning in HTML and must be escaped:

Character Entity Description
<&lt;Less than
>&gt;Greater than
&&amp;Ampersand
"&quot;Double quote
'&apos;Single quote
HTML
CSS
JS

Common Useful Entities

HTML
CSS
JS

Symbols and Special Characters

HTML
CSS
JS
Numeric Codes: You can also use numeric codes: &#60; for < or &#x3C; (hex).

Quick Quiz

Which entity creates a non-breaking space?

A
&space;
B
&nbsp;
C
&sp;
D
&blank;