Cheat Sheets

HTML Entities Cheat Sheet: Symbols, Quotes, Spaces & Named Characters

By ArpaNeuro Team September 9, 2026
HTML entities cheat sheet

HTML entities replace characters that would break markup or that you cannot type easily. In a UTF-8 document you can type © and — directly, but &, <, and > inside text still need encoding. Named entities like &nbsp; and &amp; remain everyday tools.

This HTML cheat sheet is written for people searching for a fast, accurate reference: students, junior developers, and teams shipping production software. Pin it, copy the snippets, and come back when syntax slips.

Quick reference

  • Ampersand: &amp; — always encode & in text and in attribute values.
  • Less / greater: &lt; and &gt; when showing tags as text.
  • Quotes: &quot; in double-quoted attributes; &apos; is available but &#39; is widely used.
  • nbsp: &nbsp; is a non-breaking space. Do not use it to indent layouts.
  • Copyright: &copy; or the UTF-8 character ©.
  • Dashes: &ndash; (–) and &mdash; (—). Hyphen-minus - is still the ASCII hyphen.
  • Numeric: &#169; decimal, &#xA9; hex. Prefer named entities when they exist.
  • Charset: Entities are not a substitute for <meta charset="UTF-8">.

Copy-paste examples

Safe text and a price line

Encode & in copy. Use UTF-8 for currency symbols if the file is saved as UTF-8.

<p>HTML compares tags with &lt;div&gt; and &amp; attributes.</p>
<p>Price: $19&nbsp;99 &copy; 2026 Acme</p>
<p>Quote: &ldquo;Ship it.&rdquo;</p>

Common mistakes

  • Leaving raw & in copy (Tom & Jerry) so the parser treats it as an entity start.
  • Indenting with chains of &nbsp; instead of CSS margin or gap.
  • Double-encoding (&amp;amp;) after running text through htmlspecialchars twice.
  • Assuming Latin-1 numeric codes without a UTF-8 charset declaration.

FAQ

  1. Do I need entities for emoji? No, if the document is UTF-8. Emoji are characters. Entities are for reserved markup chars and a few stubborn symbols.
  1. BLOGPH0 vs CSS? Use CSS for layout. Use nbsp only to keep two words or a value and unit on the same line.
  1. Named or numeric? Named (&copy;) is readable. Numeric works for any Unicode code point when no name exists.

Related HTML cheat sheets

Build with this stack

When a cheat sheet is not enough — you need a production app, a student FYP, or a custom dashboard — ArpaNeuro builds custom web development and also sells ready-made source code. Request a quote and tell us the stack.

Browse software development services or the source code marketplace if you want a working codebase instead of starting from a blank file.

← All Articles Get a Quote →