HTML Entities
Some characters are reserved in HTML.
It is not possible to use the less than (<) or greater than (>) signs in your text, because the browser will mix them with tags.
To actually display reserved characters, we must use character entities in the HTML source code.
A character entity looks like this:
OR
&#entity_number;To display a less than sign we must write: < or <
Tip: The advantage of using an entity name, instead of a number, is that the name is easier to remember. However, the disadvantage is that browsers may not support all entity names (the support for entity numbers is very good).
Non-breaking Space
A common character entity used in HTML is the non-breaking space ( ).
Browsers will always truncate spaces in HTML pages. If you write 10 spaces in your text, the browser will remove 9 of them, before displaying the page. To add spaces to your text, you can use the character entity.
HTML Entities Example
Experiment with HTML character entities: Try it yourself
HTML Useful Character Entities
Note: Entity names are case sensitive!
Result | Description | Entity Name | Entity Number |
---|---|---|---|
non-breaking space | |   | |
< | less than | < | < |
> | greater than | > | > |
& | ampersand | & | & |
? | cent | ¢ | ¢ |
? | pound | £ | £ |
? | yen | ¥ | ¥ |
? | euro | € | € |
§ | section | § | § |
? | copyright | © | © |
? | registered trademark | ® | ® |
? | trademark | ™ | ™ |
For a complete reference of all character entities, visit our HTML Entities Reference.
HTML ISO-8859-1 Reference
Modern browsers supports several character-sets:
- ASCII character set
- Standard ISO character sets
- Mathematical symbols, Greek letters, and other symbols
ISO-8859-1
ISO-8859-1 is the default character set in most browsers.
The first 128 characters of ISO-8859-1 is the original ASCII character-set (the numbers from 0-9, the uppercase and lowercase English alphabet, and some special characters).
The higher part of ISO-8859-1 (codes from 160-255) contains the characters used in Western European countries and some commonly used special characters.
Entities are used to implement reserved characters or to express characters that cannot easily be entered with the keyboard.
Reserved Characters in HTML
Some characters are reserved in HTML and XHTML. For example, you cannot use the greater than or less than signs within your text because the browser could mistake them for markup.
HTML and XHTML processors must support the five special characters listed in the table below:
Character | Entity Number | Entity Name | Description |
---|---|---|---|
" | " | " | quotation mark |
' | ' | ' | apostrophe |
& | & | & | ampersand |
< | < | < | less-than |
> | > | > | greater-than |
Note: Entity names are case sensitive!
ISO 8859-1 Symbols
Character | Entity Number | Entity Name | Description |
---|---|---|---|
  | | non-breaking space | |
? | ¡ | ¡ | inverted exclamation mark |
? | ¢ | ¢ | cent |
? | £ | £ | pound |
¤ | ¤ | ¤ | currency |
? | ¥ | ¥ | yen |
? | ¦ | ¦ | broken vertical bar |
§ | § | § | section |
¨ | ¨ | ¨ | spacing diaeresis |
? | © | © | copyright |
? | ª | ª | feminine ordinal indicator |
? | « | « | angle quotation mark (left) |
? | ¬ | ¬ | negation |
­ | ­ | soft hyphen | |
? | ® | ® | registered trademark |
? | ¯ | ¯ | spacing macron |
° | ° | ° | degree |
± | ± | ± | plus-or-minus |
? | ² | ² | superscript 2 |
? | ³ | ³ | superscript 3 |
? | ´ | ´ | spacing acute |
? | µ | µ | micro |
? | ¶ | ¶ | paragraph |
· | · | · | middle dot |
? | ¸ | ¸ | spacing cedilla |
? | ¹ | ¹ | superscript 1 |
? | º | º | masculine ordinal indicator |
? | » | » | angle quotation mark (right) |
? | ¼ | ¼ | fraction 1/4 |
? | ½ | ½ | fraction 1/2 |
? | ¾ | ¾ | fraction 3/4 |
? | ¿ | ¿ | inverted question mark |
× | × | × | multiplication |
÷ | ÷ | ÷ | division |
ISO 8859-1 Characters
Character | Entity Number | Entity Name | Description |
---|---|---|---|
? | À | À | capital a, grave accent |
? | Á | Á | capital a, acute accent |
? | Â | Â | capital a, circumflex accent |
? | Ã | Ã | capital a, tilde |
? | Ä | Ä | capital a, umlaut mark |
? | Å | Å | capital a, ring |
? | Æ | Æ | capital ae |
? | Ç | Ç | capital c, cedilla |
? | È | È | capital e, grave accent |
? | É | É | capital e, acute accent |
? | Ê | Ê | capital e, circumflex accent |
? | Ë | Ë | capital e, umlaut mark |
? | Ì | Ì | capital i, grave accent |
? | Í | Í | capital i, acute accent |
? | Î | Î | capital i, circumflex accent |
? | Ï | Ï | capital i, umlaut mark |
? | Ð | Ð | capital eth, Icelandic |
? | Ñ | Ñ | capital n, tilde |
? | Ò | Ò | capital o, grave accent |
? | Ó | Ó | capital o, acute accent |
? | Ô | Ô | capital o, circumflex accent |
? | Õ | Õ | capital o, tilde |
? | Ö | Ö | capital o, umlaut mark |
? | Ø | Ø | capital o, slash |
? | Ù | Ù | capital u, grave accent |
? | Ú | Ú | capital u, acute accent |
? | Û | Û | capital u, circumflex accent |
? | Ü | Ü | capital u, umlaut mark |
? | Ý | Ý | capital y, acute accent |
? | Þ | Þ | capital THORN, Icelandic |
? | ß | ß | small sharp s, German |
à | à | à | small a, grave accent |
á | á | á | small a, acute accent |
? | â | â | small a, circumflex accent |
? | ã | ã | small a, tilde |
? | ä | ä | small a, umlaut mark |
? | å | å | small a, ring |
? | æ | æ | small ae |
? | ç | ç | small c, cedilla |
è | è | è | small e, grave accent |
é | é | é | small e, acute accent |
ê | ê | ê | small e, circumflex accent |
? | ë | ë | small e, umlaut mark |
ì | ì | ì | small i, grave accent |
í | í | í | small i, acute accent |
? | î | î | small i, circumflex accent |
? | ï | ï | small i, umlaut mark |
? | ð | ð | small eth, Icelandic |
? | ñ | ñ | small n, tilde |
ò | ò | ò | small o, grave accent |
ó | ó | ó | small o, acute accent |
? | ô | ô | small o, circumflex accent |
? | õ | õ | small o, tilde |
? | ö | ö | small o, umlaut mark |
? | ø | ø | small o, slash |
ù | ù | ù | small u, grave accent |
ú | ú | ú | small u, acute accent |
? | û | û | small u, circumflex accent |
ü | ü | ü | small u, umlaut mark |
? | ý | ý | small y, acute accent |
? | þ | þ | small thorn, Icelandic |
? | ÿ | ÿ | small y, umlaut mark |