You are here: Reference > appendix > html > entities

HTML entity references

There are two additional ways in HTML documents to reference characters:
  • a numeric character reference refers to a character
  • an entity reference refers to a series of characters
Where entities are used, the referenced characters appear.

Numeric character references:

A numeric character reference can be specified in two formats:
&#nnnn; or &#xhhhh;
where the n decimal digits or the h hexadecimal characters identify the Unicode character code of the referenced character.

Entity references:

An entity reference is an alternative name for a series of characters. You can use an entity in the &name; format, where name is the name of the entity.
Custom entities cannot be declared in HTML (unlike in XML), but the HTML 4 Document Type Definitions (DTDs) provides several internal entities. The following table contains these predefined entities in HTML:
Entity name Character Decimal reference Hexadecimal reference
quot " " "
amp & & &
apos ' ' '
lt < &#60; &#x3C;
gt > &#62; &#x3E;
nbsp   &#160; &#xA0;
iexcl ¡ &#161; &#xA1;
cent ¢ &#162; &#xA2;
pound £ &#163; &#xA3;
curren ¤ &#164; &#xA4;
yen ¥ &#165; &#xA5;
brvbar ¦ &#166; &#xA6;
sect § &#167; &#xA7;
uml ¨ &#168; &#xA8;
copy © &#169; &#xA9;
ordf ª &#170; &#xAA;
laquo « &#171; &#xAB;
not ¬ &#172; &#xAC;
shy ­ &#173; &#xAD;
reg ® &#174; &#xAE;
macr ¯ &#175; &#xAF;
deg ° &#176; &#xB0;
plusmn ± &#177; &#xB1;
sup2 ² &#178; &#xB2;
sup3 ³ &#179; &#xB3;
acute ´ &#180; &#xB4;
micro µ &#181; &#xB5;
para &#182; &#xB6;
middot · &#183; &#xB7;
cedil ¸ &#184; &#xB8;
sup1 ¹ &#185; &#xB9;
ordm º &#186; &#xBA;
raquo » &#187; &#xBB;
frac14 ¼ &#188; &#xBC;
frac12 ½ &#189; &#xBD;
frac34 ¾ &#190; &#xBE;
iquest ¿ &#191; &#xBF;
Agrave À &#192; &#xC0;
Aacute Á &#193; &#xC1;
Acirc  &#194; &#xC2;
Atilde à &#195; &#xC3;
Auml Ä &#196; &#xC4;
Aring Å &#197; &#xC5;
AElig Æ &#198; &#xC6;
Ccedil Ç &#199; &#xC7;
Egrave È &#200; &#xC8;
Eacute É &#201; &#xC9;
Ecirc Ê &#202; &#xCA;
Euml Ë &#203; &#xCB;
Igrave Ì &#204; &#xCC;
Iacute Í &#205; &#xCD;
Icirc Î &#206; &#xCE;
Iuml Ï &#207; &#xCF;
ETH Ð &#208; &#xD0;
Ntilde Ñ &#209; &#xD1;
Ograve Ò &#210; &#xD2;
Oacute Ó &#211; &#xD3;
Ocirc Ô &#212; &#xD4;
Otilde Õ &#213; &#xD5;
Ouml Ö &#214; &#xD6;
times × &#215; &#xD7;
Oslash Ø &#216; &#xD8;
Ugrave Ù &#217; &#xD9;
Uacute Ú &#218; &#xDA;
Ucirc Û &#219; &#xDB;
Uuml Ü &#220; &#xDC;
Yacute Ý &#221; &#xDD;
THORN Þ &#222; &#xDE;
szlig ß &#223; &#xDF;
agrave à &#224; &#xE0;
aacute á &#225; &#xE1;
acirc â &#226; &#xE2;
atilde ã &#227; &#xE3;
auml ä &#228; &#xE4;
aring å &#229; &#xE5;
aelig æ &#230; &#xE6;
ccedil ç &#231; &#xE7;
egrave è &#232; &#xE8;
eacute é &#233; &#xE9;
ecirc ê &#234; &#xEA;
euml ë &#235; &#xEB;
igrave ì &#236; &#xEC;
iacute í &#237; &#xED;
icirc î &#238; &#xEE;
iuml ï &#239; &#xEF;
eth ð &#240; &#xF0;
ntilde ñ &#241; &#xF1;
ograve ò &#242; &#xF2;
oacute ó &#243; &#xF3;
ocirc ô &#244; &#xF4;
otilde õ &#245; &#xF5;
ouml ö &#246; &#xF6;
divide ÷ &#247; &#xF7;
oslash ø &#248; &#xF8;
ugrave ù &#249; &#xF9;
uacute ú &#250; &#xFA;
ucirc û &#251; &#xFB;
uuml ü &#252; &#xFC;
yacute ý &#253; &#xFD;
thorn þ &#254; &#xFE;
yuml ÿ &#255; &#xFF;
OElig Π&#338; &#x152;
oelig œ &#339; &#x153;
Scaron Š &#352; &#x160;
scaron š &#353; &#x161;
Yuml Ÿ &#376; &#x178;
fnof ƒ &#402; &#x192;
circ ˆ &#710; &#x2C6;
tilde ˜ &#732; &#x2DC;
Alpha Α &#913; &#x391;
Beta Β &#914; &#x392;
Gamma Γ &#915; &#x393;
Delta Δ &#916; &#x394;
Epsilon Ε &#917; &#x395;
Zeta Ζ &#918; &#x396;
Eta Η &#919; &#x397;
Theta Θ &#920; &#x398;
Iota Ι &#921; &#x399;
Kappa Κ &#922; &#x39A;
Lambda Λ &#923; &#x39B;
Mu Μ &#924; &#x39C;
Nu Ν &#925; &#x39D;
Xi Ξ &#926; &#x39E;
Omicron Ο &#927; &#x39F;
Pi Π &#928; &#x3A0;
Rho Ρ &#929; &#x3A1;
Sigma Σ &#931; &#x3A3;
Tau Τ &#932; &#x3A4;
Upsilon Υ &#933; &#x3A5;
Phi Φ &#934; &#x3A6;
Chi Χ &#935; &#x3A7;
Psi Ψ &#936; &#x3A8;
Omega Ω &#937; &#x3A9;
alpha α &#945; &#x3B1;
beta β &#946; &#x3B2;
gamma γ &#947; &#x3B3;
delta δ &#948; &#x3B4;
epsilon ε &#949; &#x3B5;
zeta ζ &#950; &#x3B6;
eta η &#951; &#x3B7;
theta θ &#952; &#x3B8;
iota ι &#953; &#x3B9;
kappa κ &#954; &#x3BA;
lambda λ &#955; &#x3BB;
mu μ &#956; &#x3BC;
nu ν &#957; &#x3BD;
xi ξ &#958; &#x3BE;
omicron ο &#959; &#x3BF;
pi π &#960; &#x3C0;
rho ρ &#961; &#x3C1;
sigmaf ς &#962; &#x3C2;
sigma σ &#963; &#x3C3;
tau τ &#964; &#x3C4;
upsilon υ &#965; &#x3C5;
phi φ &#966; &#x3C6;
chi χ &#967; &#x3C7;
psi ψ &#968; &#x3C8;
omega ω &#969; &#x3C9;
thetasym ϑ &#977; &#x3D1;
upsih ϒ &#978; &#x3D2;
piv ϖ &#982; &#x3D6;
ensp &#8194; &#x2002;
emsp &#8195; &#x2003;
thinsp &#8201; &#x2009;
zwnj &#8204; &#x200C;
zwj &#8205; &#x200D;
lrm &#8206; &#x200E;
rlm &#8207; &#x200F;
ndash &#8211; &#x2013;
mdash &#8212; &#x2014;
lsquo &#8216; &#x2018;
rsquo &#8217; &#x2019;
sbquo &#8218; &#x201A;
ldquo &#8220; &#x201C;
rdquo &#8221; &#x201D;
bdquo &#8222; &#x201E;
dagger &#8224; &#x2020;
Dagger &#8225; &#x2021;
bull &#8226; &#x2022;
hellip &#8230; &#x2026;
permil &#8240; &#x2030;
prime &#8242; &#x2032;
Prime &#8243; &#x2033;
lsaquo &#8249; &#x2039;
rsaquo &#8250; &#x203A;
oline &#8254; &#x203E;
frasl &#8260; &#x2044;
euro &#8364; &#x20AC;
image &#8465; &#x2111;
weierp &#8472; &#x2118;
real &#8476; &#x211C;
trade &#8482; &#x2122;
alefsym &#8501; &#x2135;
larr &#8592; &#x2190;
uarr &#8593; &#x2191;
rarr &#8594; &#x2192;
darr &#8595; &#x2193;
harr &#8596; &#x2194;
crarr &#8629; &#x21B5;
lArr &#8656; &#x21D0;
uArr &#8657; &#x21D1;
rArr &#8658; &#x21D2;
dArr &#8659; &#x21D3;
hArr &#8660; &#x21D4;
forall &#8704; &#x2200;
part &#8706; &#x2202;
exist &#8707; &#x2203;
empty &#8709; &#x2205;
nabla &#8711; &#x2207;
isin &#8712; &#x2208;
notin &#8713; &#x2209;
ni &#8715; &#x220B;
prod &#8719; &#x220F;
sum &#8721; &#x2211;
minus &#8722; &#x2212;
lowast &#8727; &#x2217;
radic &#8730; &#x221A;
prop &#8733; &#x221D;
infin &#8734; &#x221E;
ang &#8736; &#x2220;
and &#8743; &#x2227;
or &#8744; &#x2228;
cap &#8745; &#x2229;
cup &#8746; &#x222A;
int &#8747; &#x222B;
there4 &#8756; &#x2234;
sim &#8764; &#x223C;
cong &#8773; &#x2245;
asymp &#8776; &#x2248;
ne &#8800; &#x2260;
equiv &#8801; &#x2261;
le &#8804; &#x2264;
ge &#8805; &#x2265;
sub &#8834; &#x2282;
sup &#8835; &#x2283;
nsub &#8836; &#x2284;
sube &#8838; &#x2286;
supe &#8839; &#x2287;
oplus &#8853; &#x2295;
otimes &#8855; &#x2297;
perp &#8869; &#x22A5;
sdot &#8901; &#x22C5;
lceil &#8968; &#x2308;
rceil &#8969; &#x2309;
lfloor &#8970; &#x230A;
rfloor &#8971; &#x230B;
lang &#9001; &#x2329;
rang &#9002; &#x232A;
loz &#9674; &#x25CA;
spades &#9824; &#x2660;
clubs &#9827; &#x2663;
hearts &#9829; &#x2665;
diams &#9830; &#x2666;
Notes:
  • the apos entity is not supported by Internet Explorer
  • all entities are case sensitive, but the amp, copy, gt, lt, quot and req entities can also be used in uppercase (AMP, COPY, etc.).

Example 1:

This example illustrates the use of predefined entities in HTML documents:
<body>
    2 &lt; 5 and 5 &lt; 10 so 10 &gt; 2
</body>
Did you find this example helpful? yes no

External links:

User Contributed Comments

Post Content

Post Content