HTML4 Entity Sets

HTML 4.0 predefines several hundred named entities for use in your documents, many of which are quite useful. For instance, the nonbreaking space is  . XML, however, defines only five named entities:

  • &
  • The ampersand (&)
  • <
  • The less-than sign (<)
  • &gt;
  • The greater-than sign (>)
  • &quot;
  • The straight double quote (")
  • &apos;
  • The apostrophe (')

Other needed characters can be inserted with character references in decimal or hexadecimal format. For instance, the nonbreaking space is Unicode character 160 (decimal). Therefore, you can insert it in your document as either   or  . If you really want to type it as &nbsp;, you can define this entity reference in your DTD. Doing so requires you to use a character reference:

<!ENTITY nbsp " ">

The XHTML 1.0 specification includes three DTD fragments that define the familiar HTML character references:

Feel free to borrow these entity sets for your own use. They should be included in your document's DTD with these parameter entity references and PUBLIC identifiers:

<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"> %HTMLlat1; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"> %HTMLspecial; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent"> %HTMLsymbol;

However, we do recommend saving local copies and changing the system identifier to match the new location, rather than downloading them from the http://www.w3.org every time you need to parse a file. You may import just one, two, or all three of them, depending on what you need. There are no interdependencies.

Alternatively, just use the character references given in Table 26-4 through Table 26-6.

Table 26-4. The HTML Latin-1 entity set

Character Meaning XHTMLentity reference Hexadecimalcharacter reference Decimalcharacter reference
Nonbreaking space
&nbsp;
 
 
¡ Inverted exclamation mark
&iexcl;
¡
¡
¢ Cent sign
&cent;
¢
¢
£ Pound sign
&pound;
£
£
¤ Currency sign
&curren;
¤
¤
¥ Yen sign, Yuan sign
&yen;
¥
¥
| Broken vertical bar
&brvbar;
¦
¦
§ sign
&sect;
§
§
Figure Dieresis, spacing dieresis
&uml;
¨
¨
copyleft sign
&copy;
©
©
ª Feminine ordinal indicator
&ordf;
ª
ª
« Left-pointing double angle quotation mark, left-pointing guillemot
&laquo;
«
«
¬ Not sign
&not;
¬
¬
- Soft hyphen, discretionary hyphen
&shy;
­
­
Registered trademark sign
&reg;
®
®
¯ Macron, overline, APL overbar
&macr;
¯
¯
° Degree sign
&deg;
°
°
± Plus-or-minus sign
&plusmn;
±
±
Superscript digit two, squared
&sup2;
²
²
Superscript digit three, cubed
&sup3;
³
³
´ Acute accent, spacing acute
&acute;
´
´
µ Micro sign
&micro;
µ
µ
Pilcrow sign, paragraph sign
&para;
Figure Middle dot, Georgian comma, Greek middle dot
&middot;
·
·
¸ Cedilla, spacing cedilla
&cedil;
¸
¸
Superscript digit one
&sup1;
¹
¹
º Masculine ordinal indicator
&ordm;
º
º
» Right-pointing double angle quotation mark, right-pointing guillemot
&raquo;
»
»
/ Vulgar fraction one-quarter
&frac14;
¼
¼
/ Vulgar fraction one-half
&frac12;
½
½
/ Vulgar fraction three-quarters
&frac34;
¾
¾
¿ Inverted question mark
&iquest;
¿
¿
À Latin capital letter A with grave
&Agrave;
À
À
Á Latin capital letter A with acute
&Aacute;
Á
Á
 Latin capital letter A with circumflex
&Acirc;
Â
Â
à Latin capital letter A with tilde
&Atilde;
Ã
Ã
Ä Latin capital letter A with dieresis
&Auml;
Ä
Ä
Å Latin capital letter A with ring above, Latin capital letter A ring
&Aring;
Å
Å
Æ Latin capital letter AE, Latin capital ligature AE
&AElig;
Æ
Æ
Ç Latin capital letter C with cedilla
&Ccedil;
Ç
Ç
È Latin capital letter E with grave
&Egrave;
È
È
É Latin capital letter E with acute
&Eacute;
É
É
Ê Latin capital letter E with circumflex
&Ecirc;
Ê
Ê
Ë Latin capital letter E with dieresis
&Euml;
Ë
Ë
Ì Latin capital letter I with grave
&Igrave;
Ì
Ì
Í Latin capital letter I with acute
&Iacute;
Í
Í
Î Latin capital letter I with circumflex
&Icirc;
Î
Î
Ï Latin capital letter I with dieresis
&Iuml;
Ï
Ï
Figure Latin capital letter eth
&ETH;
Ð
Ð
Ñ Latin capital letter N with tilde
&Ntilde;
Ñ
Ñ
Ò Latin capital letter O with grave
&Ograve;
Ò
Ò
Ó Latin capital letter O with acute
&Oacute;
Ó
Ó
Ô Latin capital letter O with circumflex
&Ocirc;
Ô
Ô
Õ Latin capital letter O with tilde
&Otilde;
Õ
Õ
Ö Latin capital letter O with dieresis
&Ouml;
Ö
Ö
x Multiplication sign
&times;
×
×
Ø Latin capital letter O with stroke
&Oslash;
Ø
Ø
Ù Latin capital letter U with grave
&Ugrave;
Ù
Ù
Ú Latin capital letter U with acute
&Uacute;
Ú
Ú
Û Latin capital letter U with circumflex
&Ucirc;
Û
Û
Ü Latin capital letter U with dieresis
&Uuml;
Ü
Ü
Figure Latin capital letter Y with acute
&Yacute;
Ý
Ý
Figure Latin capital letter thorn
&THORN;
Þ
Þ
ß Latin small letter sharp s, ess-zett
&szlig;
ß
ß
à Latin small letter a with grave
&agrave;
à
à
á Latin small letter a with acute
&aacute;
á
á
â Latin small letter a with circumflex
&acirc;
â
â
ã Latin small letter a with tilde
&atilde;
ã
ã
ä Latin small letter a with dieresis
&auml;
ä
ä
å Latin small letter a with ring above
&aring;
å
å
æ Latin small letter ae, Latin small ligature ae
&aelig;
æ
æ
ç Latin small letter c with cedilla
&ccedil;
ç
ç
è Latin small letter e with grave
&egrave;
è
è
Latin small letter e with acute
&eacute;
é
é
ê Latin small letter e with circumflex
&ecirc;
ê
ê
ë Latin small letter e with dieresis
&euml;
ë
ë
ì Latin small letter i with grave
&igrave;
ì
ì
í Latin small letter i with acute
&iacute;
í
í
î Latin small letter i with circumflex
&icirc;
î
î
ï Latin small letter i with dieresis
&iuml;
ï
ï
Figure Latin small letter eth
&eth;
ð
ð
ñ Latin small letter n with tilde
&ntilde;
ñ
ñ
ò Latin small letter o with grave
&ograve;
ò
ò
ó Latin small letter o with acute
&oacute;
ó
ó
ô Latin small letter o with circumflex
&ocirc;
ô
ô
õ Latin small letter o with tilde
&otilde;
õ
õ
ö Latin small letter o with dieresis
&ouml;
ö
ö
÷ Division sign
&divide;
÷
÷
ø Latin small letter o with stroke
&oslash;
ø
ø
ù Latin small letter u with grave
&ugrave;
ù
ù
ú Latin small letter u with acute
&uacute;
ú
ú
û Latin small letter u with circumflex
&ucirc;
û
û
ü Latin small letter u with dieresis
&uuml;
ü
ü
Figure Latin small letter y with acute
&yacute;
ý
ý
Figure Latin small letter thorn
&thorn;
þ
þ
ÿ Latin small letter y with dieresis
&yuml;
ÿ
ÿ

Table 26-5. The HTML special characters entity set

Character Meaning XHTML entity reference Hexadecimal character reference Decimal character reference
" Quotation mark, APL quote
&quot;
"
"
& Ampersand
&amp;
&
&
' Apostrophe mark
&apos;
'
'
< Less-than sign
&lt;
<
<
> Greater-than sign
&gt;
>
>
Figure Latin capital ligature OE
&OElig;
Œ
Œ
Figure Latin small ligature oe
&oelig;
œ
œ
Figure Latin capital letter S with caron
&Scaron;
Š
Š
Figure Latin small letter s with caron
&scaron;
š
š
Figure Latin capital letter Y with dieresis
&Yuml;
Ÿ
Ÿ
~ Modifier letter circumflex accent
&circ;
ˆ
ˆ
~ Small tilde
&tilde;
˜
˜
En space
&ensp;
Em space
&emsp;
Thin space
&thinsp;
Nonprinting character Zero width nonjoiner
&zwnj;
Nonprinting character Zero width joiner
&zwj;
Nonprinting character Left-to-right mark
&lrm;
Nonprinting character Right-to-left mark
&rlm;
- En dash
&ndash;
-- Em dash
&mdash;
` Left single quotation mark
&lsquo;
' Right single quotation mark
&rsquo;
, Single low-9 quotation mark
&sbquo;
" Left double quotation mark
&ldquo;
" Right double quotation mark
&rdquo;
Figure Double low-9 quotation mark
&bdquo;
Figure Dagger
&dagger;
Figure Double dagger
&Dagger;
Figure Per mille sign
&permil;
Figure Single left-pointing angle quotation mark
&lsaquo;
Figure Single right-pointing angle quotation mark
&rsaquo;
Figure Euro sign
&euro; 

Table 26-6. The HTML symbol entity set

Character Meaning XHTML entity reference Hexadecimal character reference Decimal character reference
Figure Latin small f with hook, function, florin
&fnof;
ƒ
ƒ
A Greek capital letter alpha
&Alpha;
Α
Α
B Greek capital letter beta
&Beta;
Β
Β
Figure Greek capital letter gamma
&Gamma;
Γ
Γ
Figure Greek capital letter delta
&Delta;
Δ
Δ
E Greek capital letter epsilon
&Epsilon;
Ε
Ε
Z Greek capital letter zeta
&Zeta;
Ζ
Ζ
H Greek capital letter eta
&Eta;
Η
Η
Figure Greek capital letter theta
&Theta;
Θ
Θ
I Greek capital letter iota
&Iota;
Ι
Ι
K Greek capital letter kappa
&Kappa;
Κ
Κ
Figure Greek capital letter lambda
&Lambda;
Λ
Λ
M Greek capital letter mu
&Mu;
Μ
Μ
N Greek capital letter nu
&Nu;
Ν
Ν
Figure Greek capital letter xi
&Xi;
Ξ
Ξ
O Greek capital letter omicron
&Omicron;
Ο
Ο
Figure Greek capital letter pi
&Pi;
Π
Π
Figure Greek capital letter rho
&Rho;
Ρ
Ρ
Figure Greek capital letter sigma
&Sigma;
Σ
Σ
T Greek capital letter tau
&Tau;
Τ
Τ
Figure Greek capital letter upsilon
&Upsilon;
Υ
Υ
Figure Greek capital letter phi
&Phi;
Φ
Φ
Figure Greek capital letter chi
&Chi;
Χ
Χ
Figure Greek capital letter psi
&Psi;
Ψ
Ψ
Figure Greek capital letter omega
&Omega;
Ω
Ω
Figure Greek small letter alpha
&alpha;
α
α
Figure Greek small letter beta
&beta;
β
β
Figure Greek small letter gamma
&gamma;
γ
γ
Figure Greek small letter delta
&delta;
δ
δ
Figure Greek small letter epsilon
&epsilon;
ε
ε
Figure Greek small letter zeta
&zeta;
ζ
ζ
Figure Greek small letter eta
&eta;
η
η
Figure Greek small letter theta
&theta;
θ
θ
Figure Greek small letter iota
&iota;
ι
ι
Figure Greek small letter kappa
&kappa;
κ
κ
Figure Greek small letter lambda
&lambda;
λ
λ
μ Greek small letter mu
&mu;
μ
μ
Figure Greek small letter nu
&nu;
ν
ν
Figure Greek small letter xi
&xi;
ξ
ξ
Figure Greek small letter omicron
&omicron;
ο
ο
Figure Greek small letter pi
&pi;
π
π
Figure Greek small letter rho
&rho;
ρ
ρ
Figure Greek small letter final sigma
&sigmaf;
ς
ς
Figure Greek small letter sigma
&sigma;
σ
σ
Figure Greek small letter tau
&tau;
τ
τ
Figure Greek small letter upsilon
&upsilon;
υ
υ
Figure Greek small letter phi
&phi;
φ
φ
Figure Greek small letter chi
&chi;
χ
χ
Figure Greek small letter psi
&psi;
ψ
ψ
Figure Greek small letter omega
&omega;
ω
ω
Figure Greek small letter theta symbol
&thetasym;
ϑ
ϑ
Figure Greek upsilon with hook symbol
&upsih;
ϒ
ϒ
Figure Greek pi symbol
&piv;
ϖ
ϖ
· Bullet, black small circle
&bull;
... Horizontal ellipsis, three-dot leader
&hellip;
´ Prime, minutes, feet
&prime;
Figure Double prime, seconds, inches
&Prime;
¯ Overline, spacing overscore
&oline;
/ Fraction slash
&frasl;
Figure Black letter capital I, imaginary part
&image;
Figure Script capital P, power set, Weierstrass p
&weierp;
Figure Black letter capital R, real part symbol
&real;
Trademark sign
&trade;
Figure Aleph symbol, first transfinite cardinal
&alefsym;
Figure Leftward arrow
&larr;
Figure Upward arrow
&uarr;
Figure Rightward arrow
&rarr;
Figure Downward arrow
&darr;
Figure Left-right arrow
&harr;
Figure Downward arrow with corner leftward, carriage return
&crarr;
Figure Leftward double arrow
&lArr;
Figure Upward double arrow
&uArr;
Figure Rightward double arrow
&rArr;
Figure Downward double arrow
&dArr;
Figure Left-right double arrow
&hArr;
Figure For all
&forall;
Figure Partial differential
&part;
Figure There exists
&exist;
Figure Empty set, null set, diameter
&empty;
Figure Nabla, backward difference
&nabla;
Figure Element of
&isin;
Figure Not an element of
&notin;
Figure Contains as member
&ni;
Figure N-ary product, product sign
&prod;
Figure N-ary summation
&sum;
- Minus sign
&minus;
* Asterisk operator
&lowast;
Figure Square root, radical sign
&radic;
Figure Proportional to
&prop;
Figure Infinity
&infin;
Figure Angle
&ang;
Figure Logical and, wedge
&and;
Figure Logical or, vee
&or;
Figure Intersection, cap
&cap;
Figure Union, cup
&cup;
Figure Integral
&int;
Figure Therefore
&there4;
~ Tilde operator, varies with, similar to
&sim;
Figure Approximately equal to
&cong;
Figure Almost equal to, asymptotic to
&asymp;
Figure Not equal to
&ne;
Figure Identical to
&equiv;
Figure Less than or equal to
&le;
Figure Greater than or equal to
&ge;
Figure Subset of
&sub;
Figure Superset of
&sup;
Figure Not a subset of
&nsub;
Figure Subset of or equal to
&sube;
Figure Superset of or equal to
&supe;
Figure Circled plus, direct sum
&oplus;
Figure Circled times, vector product
&otimes;
Figure Up tack, orthogonal to, perpendicular
&perp;
Figure Dot operator
&sdot;
Figure Left ceiling, APL upstile
&lceil;
Figure Right ceiling
&rceil;
Figure Left floor, APL downstile
&lfloor;
Figure Right floor
&rfloor;
Figure Left-pointing angle bracket, bra
&lang;
Figure Right-pointing angle bracket, ket
&rang;
Figure Lozenge
&loz;
Figure Black spade suit
&spades;
Figure Black club suit, shamrock
&clubs;
Figure Black heart suit, valentine
&hearts;
Figure Black diamond suit
&diams;