What the heck is an HTML entity? They have names? That’s what I thought the first time I heard that term. I was publishing an article with Jekyll . I noticed that Jekyll does not like to have <
and >
characters in the article front matter. Post titles in partciular. Interestingly, HTML>
works just fine. But <HTML
, or the real offender, <HTML>
seem to end up getting ignored. Jekyll will still generate the site. It just doesn’t include the offending string. So I did a little research and found a nifty workaround to this problem.
Meet HTML entities
Using a predefined string of characters it is possible to represent symbols like <, >, µ, and §, in places where it would otherwise be difficult. <
and >
represent open and close tag symbols without being rendered as HTML and without needing to appear in a code block. µ
(µ) and §
(§) make it possible to print symbols that might otherwise be difficult to produce with a regular keyboard.
See also: Complete list of HTML tags up to date for HTML5
This looks rather awkward at first. But there’s a method to the madness! HTML entity numbers begin with &#
(ampersand pound) and end with ;
(semicolon).
So far we’ve referenced HTML entities by number. But many of them have names, too.
The beginning and end tags are the same when using names. The only difference is the lack of the number sign and of course a name is used instead of a number. Names are great because they can be easier to remember than numbers. For example, <
(<) stands for “less than” and >
(>) stands for “greater than.” I think that’s a great deal easier to remember than <
and >
.
Where can I use HTML entities?
HTML entities are pretty versatile. They can be separated by white space, placed back to back, inside parenthesis, back to back with another string of code. As long as there isn’t a mix up involving &
and ;
characters, there shouldn’t be a problem.
Punctuation, programming, and other common symbols
While all of the common symbols listed here have entity numbers, some of them do not have names. Remember to include a #
when referencing an HTML entity by number and exclude it when using the name.
Description
Number
Name
Symbol
Open tag
<
<
<
Close tag
>
>
>
Double quote
"
"
”
Apostrophe / single quote
'
'
’
Colon
:
:
Semicolon
;
;
Grave accent
`
`
Forward slash
/
/
Backslash
\
\
Exclamation mark
!
!
Question mark
?
?
Octothorp / hashtag / pound
#
#
Asterisk (star)
*
*
Percentage
%
%
Ampersand
&
&
&
Open parenthesis
(
(
Close parenthesis
)
)
Hyphen / dash / minus
-
-
Comma
,
,
Period
.
.
At sign
@
@
Caret symbol
^
^
Open square bracket
[
[
Close square bracket
]
]
Open curly bracket
{
{
Close curly bracket
}
}
Tilde
~
~
Underscore
_
_
Space
 
Space (non-breaking)
 
Vertical bar
|
|
Broken bar
¦
¦
¦
Upside down exclamation mark
¡
¡
¡
Upside down question mark
¿
¿
¿
Section symbol
§
§
§
Umlaut
¨
¨
¨
Feminine ordinal indicator
ª
ª
ª
Masculine ordinal indicator
º
º
º
Open double angles
«
«
«
Close double angles
»
»
»
Not sign
¬
¬
¬
Soft hyphen
­
­
Overline
¯
¯
¯
Acute accent
´
´
´
Pilcrow (paragraph)
¶
¶
¶
Georgian comma
·
·
·
Cedilla
¸
¸
¸
Math symbols
description
number
name
symbol
Plus sign (addition)
+
+
Minus sign (subtraction)
−
−
−
Multiplication sign
×
×
×
Division sign
÷
÷
÷
Plus / minus
±
±
±
Equals sign
=
=
Less or equal
≤
≤
≤
Greater or equal
≥
≥
≥
Superscript 1
¹
¹
¹
Superscript 2
²
²
²
Superscript 3
³
³
³
1/4
¼
¼
¼
1/2
½
½
½
3/4
¾
¾
¾
For all
∀
∀
∀
Part
∂
∂
∂
Exist
∃
∃
∃
Empty
∅
∅
∅
Nabla
∇
∇
∇
Is in
∈
∈
∈
Not in
∉
∉
∉
Ni
∋
∋
∋
Product
∏
∏
∏
Sum
∑
∑
∑
Asterisk (Lowast)
∗
∗
∗
Square root
√
√
√
Proportional to
∝
∝
∝
Infinity
∞
∞
∞
Angle
∠
∠
∠
And
∧
∧
∧
Or
∨
∨
∨
Cap
∩
∩
∩
Cup
∪
∪
∪
Integral
∫
∫
∫
Therefore
∴
∴
∴
Similar to
∼
∼
∼
Congurent to
≅
≅
≅
Almost equal
≈
≈
≈
Not equal
≠
≠
≠
Equivalent
≡
≡
≡
Subset of
⊂
⊂
⊂
Superset of
⊃
⊃
⊃
Not subset of
⊄
⊄
⊄
Subset or equal
⊆
⊆
⊆
Superset or equal
⊇
⊇
⊇
Circled plus
⊕
⊕
⊕
Circled times
⊗
⊗
⊗
Unit of measure symbols
description
number
name
symbol
Degrees
°
°
°
Micro
µ
µ
µ
Copyright, registered, trademark
description
number
name
symbol
Copyright
©
©
©
Registered trademark
®
®
®
Trademark
™
™
™
Currency symbols
description
number
name
symbol
Currency sign
¤
¤
¤
Dollar sign
$
$
Cents
¢
¢
¢
British pounds
£
£
£
Euro
€
€
€
Yen
¥
¥
¥
Greek alphabet
description
number
name
symbol
UPPERCASE ALPHA
Α
Α
Α
lowercase alpha
α
α
α
UPPERCASE BETA
Β
Β
Β
lowercase beta
β
β
β
UPPERCASE GAMMA
Γ
Γ
Γ
lowercase gamma
γ
γ
γ
UPPERCASE DELTA
Δ
Δ
Δ
lowercase delta
δ
δ
δ
UPPERCASE EPSILON
Ε
Ε
Ε
lowercase epsilon
ε
ε
ε
UPPERCASE ZETA
Ζ
Ζ
Ζ
lowercase zeta
ζ
ζ
ζ
UPPERCASE ETA
Η
Η
Η
lowercase eta
η
η
η
UPPERCASE THETA
Θ
Θ
Θ
lowercase theta
θ
θ
θ
alternate lowercase theta
ϑ
ϑ
ϑ
UPPERCASE IOTA
Ι
Ι
Ι
lowercase iota
ι
ι
ι
UPPERCASE KAPPA
Κ
Κ
Κ
lowercase kappa
κ
κ
κ
UPPERCASE LAMBDA
Λ
Λ
Λ
lowercase lambda
λ
λ
λ
UPPERCASE MU
Μ
Μ
Μ
lowercase mu
μ
μ
μ
UPPERCASE NU
Ν
Ν
Ν
lowercase nu
ν
ν
ν
UPPERCASE XI
Ξ
Ξ
Ξ
lowercase xi
ξ
ξ
ξ
UPPERCASE OMICRON
Ο
Ο
Ο
lowercase omicron
ο
ο
ο
UPPERCASE PI
Π
Π
Π
lowercase pi
π
π
π
alternative lowercase pi
ϖ
ϖ
ϖ
UPPERCASE RHO
Ρ
Ρ
Ρ
lowercase rho
ρ
ρ
ρ
UPPERCASE SIGMA
Σ
Σ
Σ
lowercase sigma
σ
σ
σ
final form lowercase sigma
ς
ς
ς
UPPERCASE TAU
Τ
Τ
Τ
lowercase tau
τ
τ
τ
UPPERCASE UPSILON
Υ
Υ
Υ
lowercase upsilon
υ
υ
υ
alternative lowercase upsilon
ϒ
ϒ
ϒ
UPPERCASE PHI
Φ
Φ
Φ
lowercase phi
φ
φ
φ
UPPERCASE CHI
Χ
Χ
Χ
lowercase chi
χ
χ
χ
UPPERCASE PSI
Ψ
Ψ
Ψ
lowercase psi
ψ
ψ
ψ
UPPERCASE OMEGA
Ω
Ω
Ω
lowercase omega
ω
ω
ω
Arrows
description
number
name
symbol
Left arrow
←
←
←
Up arrow
↑
↑
↑
Right arrow
→
→
→
Down arrow
↓
↓
↓
Left & right arrow
↔
↔
↔
Carriage return arrow
↵
↵
↵
Spade, club, heart, diamond
description
number
name
symbol
Spade
♠
♠
♠
Club
♣
♣
♣
Heart
♥
♥
♥
Diamond
♦
♦
♦
Accented letters
description
number
name
symbol
CAPITAL A GRAVE ACCENT
À
À
À
lowercase a grave accent
à
à
à
CAPITAL A ACUTE ACCENT
Á
Á
Á
lowercase a acute accent
á
á
á
CAPITAL A CIRCUMFLEX ACCENT
Â
Â
Â
lowercase a circumflex accent
â
â
â
CAPITAL A TILDE ACCENT
Ã
Ã
Ã
lowercase a tilde accent
ã
ã
ã
CAPITAL A UMLAUT ACCENT
Ä
Ä
Ä
lowercase a umlaut accent
ä
ä
ä
CAPITAL A RING ABOVE ACCENT
Å
Å
Å
lowercase a ring accent
å
å
å
CAPITAL AE
Æ
Æ
Æ
lowercase ae
æ
æ
æ
CAPITAL C CEDILLA ACCENT
Ç
Ç
Ç
lowercase c cedilla accent
ç
ç
ç
CAPITAL E GRAVE ACCENT
È
È
È
lowercase e grave accent
è
è
è
CAPITAL E ACUTE ACCENT
É
É
É
lowercase e acute accent
é
é
é
CAPITAL E CIRCUMFLEX ACCENT
Ê
Ê
Ê
lowercase e circumflex accent
ê
ê
ê
lowercase e circumflex accent
ê
ê
ê
CAPITAL E UMLAUT ACCENT
Ë
Ë
Ë
lowercase e umlaut accent
ë
ë
ë
CAPITAL I GRAVE ACCENT
Ì
Ì
Ì
lowercase i grave accent
ì
ì
ì
CAPITAL I ACUTE ACCENT
Í
Í
Í
lowercase i acute accent
í
í
í
CAPITAL I CIRCUMFLEX ACCENT
Î
Î
Î
lowercase i circumflex accent
î
î
î
CAPITAL I UMLAUT ACCENT
Ï
Ï
Ï
lowercase i umlaut accent
ï
ï
ï
CAPITAL ICELANDIC ETH
Ð
Ð
Ð
lowercase Icelandic eth
ð
ð
ð
CAPITAL N TILDE ACCENT
Ñ
Ñ
Ñ
lowercase n tilde accent
ñ
ñ
ñ
CAPITAL O GRAVE ACCENT
Ò
Ò
Ò
lowercase o grave accent
ò
ò
ò
CAPITAL O ACUTE ACCENT
Ó
Ó
Ó
lowercase o acute accent
ó
ó
ó
CAPITAL O CIRCUMFLEX ACCENT
Ô
Ô
Ô
lowercase o circumflex accent
ô
ô
ô
CAPITAL O TILDE ACCENT
Õ
Õ
Õ
lowercase o tilde accent
õ
õ
õ
CAPITAL O UMLAUT ACCENT
Ö
Ö
Ö
lowercase o umlaut accent
ö
ö
ö
CAPITAL O SLASH ACCENT
Ø
Ø
Ø
lowercase o slash
ø
ø
ø
CAPITAL U GRAVE ACCENT
Ù
Ù
Ù
lowercase u grave accent
ù
ù
ù
CAPITAL U ACUTE ACCENT
Ú
Ú
Ú
lowercase u acute accent
ú
ú
ú
CAPITAL U CIRCUMFLEX ACCENT
Û
Û
Û
lowercase u circumflex accent
û
û
û
CAPITAL U UMLAUT
Ü
Ü
Ü
lowercase u umlaut accent
ü
ü
ü
CAPITAL Y ACUTE ACCENT
Ý
Ý
Ý
lowercase y acute accent
ý
ý
ý
lowercase y umlaut accent
ÿ
ÿ
ÿ
CAPITAL ICELANDIC THORN
Þ
Þ
Þ
lowercase Icelandic thorn
þ
þ
þ
lowercase German sharp s
ß
ß
ß
Alphanumeric characters
description
number
name
symbol
Number 0
0
0
Number 1
1
1
Number 2
2
2
Number 3
3
3
Number 4
4
4
Number 5
5
5
Number 6
6
6
Number 7
7
7
Number 8
8
8
Number 9
9
9
UPPERCASE A
A
A
lowercase a
a
a
UPPERCASE B
B
B
lowercase b
b
b
UPPERCASE C
C
C
lowercase c
c
c
UPPERCASE D
D
D
lowercase d
d
d
UPPERCASE E
E
E
lowercase e
e
e
UPPERCASE F
F
F
lowercase f
f
f
UPPERCASE G
G
G
lowercase g
g
g
UPPERCASE H
H
H
lowercase h
h
h
UPPERCASE I
I
I
lowercase i
i
i
UPPERCASE J
J
J
lowercase j
j
j
UPPERCASE K
K
K
lowercase k
k
;
UPPERCASE L
L
L
lowercase l
l
l
UPPERCASE M
M
M
lowercase m
m
m
UPPERCASE N
N
N
lowercase n
n
n
UPPERCASE O
O
O
lowercase o
o
o
UPPERCASE P
P
P
lowercase p
p
p
UPPERCASE Q
Q
Q
lowercase q
q
q
UPPERCASE R
R
R
lowercase r
r
r
UPPERCASE S
S
S
lowercase s
s
s
UPPERCASE T
T
T
lowercase t
t
t
UPPERCASE U
U
U
lowercase u
u
u
UPPERCASE V
V
V
lowercase v
v
v
UPPERCASE W
W
W
lowercase w
w
w
UPPERCASE X
X
X
lowercase x
x
x
UPPERCASE Y
Y
Y
lowercase y
y
y
UPPERCASE Z
Z
Z
lowercase z
z
z
Miscellaneous
description
number
name
symbol
Bullet
•
•
•
Horizontal ellipsis
…
…
…
lowercase Latin f with hook
ƒ
ƒ
ƒ
Perpendicular
⊥
⊥
⊥
Dot operator
⋅
⋅
⋅
UPPERCASE LATIN OE LIGATURE
Œ
Œ
Œ
lowercase Latin oe ligature
œ
œ
œ
UPPERCASE S WITH CARON
Š
Š
Š
lowercase s with caron
š
š
š
CAPITAL Y WITH DIAERES
Ÿ
Ÿ
Ÿ
Circumflex accent
ˆ
ˆ
ˆ
Tilde (different from the tilde my keyboard generates)
˜
˜
˜
En dash
–
–
–
Em dash
—
—
—
Left single quotation mark
‘
‘
‘
Right single quotation mark
’
’
’
Single low-9 quotation mark
‚
‚
‚
Left double quotation mark
“
“
“
Right double quotation mark
”
”
”
Double low-9 quotation mark
„
„
„
Dagger
†
†
†
Double dagger
‡
‡
‡
Per mille
‰
‰
‰
Minutes (Degrees)
′
′
′
Seconds (Degrees)
″
″
″
Single left angle quotation
‹
‹
‹
Single right angle quotation
‹
›
‹
Overline
‾
‾
‾
Left ceiling
⌈
⌈
⌈
Right ceiling
⌉
⌉
⌉
Left floor
⌊
⌊
⌊
Right floor
⌋
⌋
⌋
Lozenge
◊
◊
◊
En space
 
 
Em space
 
 
Thin space
 
 
Zero width non-joiner
‌
‌
Zero width joiner
‍
‍
Left-to-right mark
‎
‎
Right-to-left mark
‏
‏