HTML and XHTML entities and special characters
Saturday, February 16th, 2008Within XHTML there are some characters which need replacing with valid XHTML entities or special charaters otherwise they will error when validiting your code in the W3C. This is also known as HTML Encoding.
There are three parts to building the entity.
- & (ampersand) - the entity always starts of with this character.
- Number or Word - this is the part of the entity which changes. This can either be a word or a number eg. amp or #38
- ; (semi-colon) - the entity always ends with this character.
Note: all entities are case sensitive.
| Character | Numeric character reference | Character entity reference | Description |
| “ | " | " | Double quote |
| & | & | & | Ampersand |
| < | < | < | Less than |
| > | > | > | Greater than |
|   | | Non-breaking space | |
| ¢ | ¢ | ¢ | Cent sign |
| £ | £ | £ | Pound sign |












