Note that character entity names begin with an ampersand (&) and end with a semicolon (;). They have the general form &<name>;. For example, to render an n with a tilde (ñ), use ñ. Alphabetic symbols often have case sensitive names, so, for example an N with a tilde (Ñ) would be Ñ.
You can use hex or decimal numbers as well as the special names for the characters. When you use the numbers, they refer to Unicode characters.
It is a good idea to check to see whether character entities are render correctly in each browser your users may have. For example, in the table below each rendering should be identical for a given character.
The following table shows a few examples. It was taken from a more extensive reference.
Character | Entity | Decimal | Hex | Rendering in Your Browser | ||
Entity | Decimal | Hex | ||||
less-than sign | < | < | < | < | < | < |
greater-than sign | > | > | > | > | > | > |
leftwards arrow | ← | ← | ← | ← | ← | ← |
upwards arrow | ↑ | ↑ | ↑ | ↑ | ↑ | ↑ |
rightwards arrow | → | → | → | → | → | → |
downwards arrow | ↓ | ↓ | ↓ | ↓ | ↓ | ↓ |
left right arrow | ↔ | ↔ | ↔ | ↔ | ↔ | ↔ |
inverted question mark | ¿ | ¿ | ¿ | ¿ | ¿ | ¿ |
inverted exclamation point | ¡ | ¡ | ¡ | ¡ | ¡ | ¡ |
Latin small letter o with grave | ò | ò | ò | ò | ò | ò |
Latin small letter o with acute | ó | ó | ó | ó | ó | ó |
Latin small letter o with circumflex | ô | ô | ô | ô | ô | ô |
Latin small letter o with tilde | õ | õ | õ | õ | õ | õ |
Latin small letter o with diaeresis | ö | ö | ö | ö | ö | ö |
Latin capital letter O with grave | Ò | Ò | Ò | Ò | Ò | Ò |
Latin capital letter O with acute | Ó | Ó | Ó | Ó | Ó | Ó |
Latin capital letter O with circumflex | Ô | Ô | Ô | Ô | Ô | Ô |
Latin capital letter O with tilde | Õ | Õ | Õ | Õ | Õ | Õ |
Latin capital letter O with diaeresis | Ö | Ö | Ö | Ö | Ö | Ö |
Greek small letter mu | μ | μ | μ | μ | μ | μ |
Greek small letter pi | π | π | π | π | π | π |
Greek capital letter mu | Μ | Μ | Μ | Μ | Μ | Μ |
Greek capital letter pi | Π | Π | Π | Π | Π | Π |