Displaying code on a page? <div> written raw becomes an actual div. Entities are the escape hatch — and in UTF-8 days, you need fewer than you think.
The five that are mandatory
< → < (less-than — starts a tag otherwise) > → > (greater-than) & → & (ampersand — starts an entity otherwise) " → " (inside double-quoted attributes) ' → ' (inside single-quoted attributes)
The useful ones
non-breaking space — keeps "₹ 500" together on line wraps © © → → × × … … — — ₹ ₹ (or just type ₹ — see below)
The 2026 reality
With <meta charset="UTF-8"> you can type ₹ © → 你好 emoji directly — entities are only required for the five reserved characters and useful for invisible ones ( , ‍). Security note: escaping user input with these five is exactly how XSS is prevented server-side — same table, higher stakes.