This is my own quick reference so I don't get misled by old 1995 specs anymore.
Last updated: March 1, 2026 • For HTML5 / UTF-8
Created and maintained by Joseph Rosevear. Many thanks to Grok (xAI) for help with the structure, modern HTML5 guidance, and escaping the traps of old specs.
| Character | Type directly | Entity (only if needed) | When to use entity |
|---|---|---|---|
| " (double quote) | " | " or " | Inside double-quoted attributes only |
| ' (apostrophe / single quote) | ' | ' or ' | Inside single-quoted attributes only |
| - (hyphen-minus) | - | - | Almost never — only in very rare parsing edge cases |
| & (ampersand) | & | & | Always when you want a literal & (e.g. AT&T) |
| < (less than) | < | < or < | When displaying literal < (code, examples) |
| > (greater than) | > | > or > | When displaying literal > (code, examples) |
| Character | Preferred entity | Numeric | Notes / Example |
|---|---|---|---|
| – (en dash) | – | – | Best for compound names: Zombie–Slackware(R) |
| — (em dash) | — | — | For parenthetical breaks — like this |
| ‑ (non-breaking hyphen) | ‑ | ‑ | Glue words together: non‑breaking |
| (non-breaking space) | | Prevent line breaks: Mr. Smith | |
| ® (registered trademark) | ® | ® | Slackware® or Slackware(R) in plain text |
<pre><code>…</code></pre>