Appendix B. HTML Character Entities

To display symbols and characters beyond the collection of common ASCII alphanumeric values (0–127), browsers recognize a special coding that lets you insert such characters into HTML document content. These entity characters start with an ampersand symbol (&) and end with a semicolon (;). Between those symbols goes a representation of the desired character in your choice of letters or numbers. For example, the numeric entity value for a copyright symbol is 169. An HTML statement using that symbol looks as follows:

<p style="text-align: center">&#169;2002 MegaCorp, Inc. All Rights Reserved.</p>

Because the numbering system is not easy to remember, entities also have case-sensitive word or abbreviation equivalents for their values. For the copyright symbol, for example, the entity is &copy;. This makes the code more readable, as in the following:

<p style="text-align: center">&copy;2002 MegaCorp, Inc. All Rights Reserved.</p>

This table lists every entity defined in the HTML 4 specification in alphabetical order. Recent browsers support the vast majority of these characters, but the user’s operating system version and its internal character set also influence whether a visitor’s browser will render any particular character.

Alpha entity

Numeric entity

Character

Description

&Aacute;

&#193;

Á

Capital letter A with acute

&aacute;

&#225;

á

Small letter a with acute

&Acirc;

&#194;

Â

Capital letter A with circumflex

&acirc;

Get Dynamic HTML: The Definitive Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.