Search notes:
HTML character entities
A HTML entity starts with an ampersand (&
) and ends with a semicolon (;
).
The portion between the ampersand is either a
In case of a code point, code point number follows a pound sign (
#
) which follows the ampersand:
-
&#xuuuu
(hexadecimal, note the x
)
-
&#uuuuu
(decimal, note the absence of the x
)
For some code points, there is also a menmonic (such as &
). With mnemonics, the ampersand is not followed by a pound sign.
&, < and >
Some characters in HTML have a special meaning and must be encoded to preserve their meaining, notably:
-
<
and >
because they denote an HTML element, and
-
&
because it starts an entity.
The <
is represented (or encoded) into a <
, the >
into a >
and the &
into a &
.
Some interesting mnemonics
Some interesting entity mnemonics, imho, include:
&xuml; | Umlaute (ä = ä, etc) |
&xgrave; | Gravis |
◯ | Circumflex |
𝓍 | Script |
&xrc; | Fractur, (𝔖 = 𝔖, 𝔷 = 𝔷) |
&fracx; | Fractionals (¾ = ¾, etc) |
𝕩 | Doubly lined(?) |
&fracAB (A for example 2, B for example 3) | Fractionals |
&xcy; | Cyrillic (Л = Л, б` = б, etc) |
ρ | Greek, unline for cyrillic, the name of the letter is written out. |
­ | The soft hyphen: it inserts a hyphen and breaks the line, if necessary. See the <wbr> HTML element for a demonstration. |
| A non-breaking space. There is no mnemonic for a *non-breaking hyphen*; it can be inserted with ‑ or ‑ . |