This article looks at the different codes that can be used to represent text characters when there is a need to escape them. Included is a list containing several characters and their codes.
Common HTML entities used for typography IntroductionThis article looks at the different codes that can be used to represent text characters when there is a need to escape them. There are a number of HTML entities that come in handy when there’s a need for first-rate typesetting. Many of those listed in the table below are useful only when used in foreign language copy (and copy written in specific dialects of English), so context should be taken into account before the choice is made to use them.
For the sake of portability, Unicode entity references should be reserved for use in documents certain to be written in the UTF-8 or UTF-16 character sets. In all other cases, the alphanumeric references should be used.
HTML Entities Table Character(s) Literal(s) Alphanumeric value(s) Unicode value(s) Prefer to Cent (currency) ¢¢
¢
Pound (currency) £ £
£
Section 1 § §
§
Copyright © ©
©
(c)
Guillemets 2 « » « »
« »
"
Registered trademark ® ®
®
(R)
Degree(s) ° °
°
Plus/minus ± ±
±
+/-
Pilcrow (paragraph) 3 ¶ ¶
¶
Middle dot 4 · ·
·
Fractional half 5 ½ ½
¼
1/2
En dash 6, 7 – –
–
-
for ranges Em (long) dash 7, 8 — —
—
-
enclosed by spaces, or --
Single quotes 9, 10 ‘ ’ ‘ ’
‘ ’
'
or '
Single low quote 11 ‚ ‚
‚
'
or comma Double quotes 9 “ ” “ ”
“ ”
", "
,
, or ``
Double low quote 11 „ „
„
"
or ,,
Single & double daggers † ‡ † ‡
† ‡
*
and **
Bullet • •
•
*
Ellipsis 12 … …
…
...
Prime & double prime 13 ′ ″ ′ ″
′ ″
'
,
, '
, "
, minutes:seconds
elapsed Euro sign € €
€
Trademark ™ ™
™
(tm)
Almost equal to ≈ ≈
≈
~
Not equal to ≠ ≠
≠
!=
Less/greater than or equal to ≤ ≥ ≤ ≥
≤ ≥
<= or >=
Less/greater than < > < >
< >
Table 1: HTML entities useful for proper typesetting, listed in order by decimal Unicode position.
HTML entity usage notesq
elements instead.display
value of inline
, which will be explained in the introduction to the CSS layout model.−
/−
). However, it should always be distinguished from a hyphen (-
), which is used to separate the parts of an ad hoc compound word.letter-spacing
or text-align
properties.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4