What are HTML entities?
Short answer
An HTML entity is a code that stands in for a character, written as an ampersand, a name or number, and a semicolon. They let you show characters that have special meaning in HTML, such as < and &, or symbols that are hard to type.
Why entities exist
Some characters are part of HTML's own syntax. A < starts a tag and an & starts an entity, so writing them literally as text can confuse the browser. Entities encode them safely so they display as characters instead of being parsed as markup.
< -> <
> -> >
& -> &
" -> "
' -> 'Named and numeric forms
Entities come in two forms: named, like © for ©, and numeric, like © or © using the character's code point. Numeric entities can represent any character, even when no named version exists.