What is an HTML Entity?

If you've worked with HTML or edited content in a CMS, you may have seen character references, often called HTML entities. They let us write reserved characters and less visible ones explicitly. For example, represents a non‑breaking space: it prevents a normal line break at that position. If you have worked with automatically generated markup from tools such as Dreamweaver, you have probably seen plenty of them.
When viewed via the browser, this entity is translated and you end up with just a space rather than any of the code you entered, or that appears in the markup. There are all kinds of HTML entities out there, some that represent symbols like the trademark or copyright symbols (™ and © respectively), some that represent punctuation (such as & for ampersands), mathematical symbols and even non‑English alphabets. However, they all begin with an ampersand (&) and end with a semicolon (;).
HTML character references can be named, decimal or hexadecimal. Unicode notation is different: a label such as U+2103 identifies a code point, but it is not an HTML escape. Not every character has a named reference; valid characters can often be written literally in a correctly encoded document instead.
For example, the degree Celsius character is ℃, with Unicode code point U+2103. In a UTF‑8 HTML document, you can write the character itself, or use ℃ in hexadecimal or ℃ in decimal. There is no named HTML reference for that single character. °C produces a degree sign followed by a capital C, which is a different two‑character sequence.
In the world of JSX development, HTML entities have fallen into the background a little, but they are still useful to understand. You can find a handy list of HTML entities (which, coincidentally, I helped curate) here.
Common Examples
The most familiar entities are usually the reserved characters: < for <, > for >, & for &, and " for a double quote. Non‑breaking spaces, copyright symbols and typographic punctuation also appear frequently in older content systems.
In JSX, you often do not need to reach for an entity if the character can be written directly and safely. Use an entity when it makes the source clearer or when the character would otherwise be parsed as markup.