Typographic Unicode

⸺

Often, I find myself skipping over typography when writing content in HTML. It's even harder, sometimes, when dealing with CSS. Here is a quick reference some common typographical characters, and how to express them in both HTML and CSS.


White Space

First, it's easy to forget that white space can be more expressive than the standard space character you get when pressing the Space Bar. Let's look closer at some common white space characters.

HTML NumberHTML NameCSS
Regular Space \0020
Non‑breaking Space  \00A0
Figure Space \2007
Tab	&tab;\0009
A table of common Unicode whitespace characters.

But, even that is not it! There are a whole range of typographical spaces that can—and should—be used in specific circumstances.

HTML NumberHTML NameCSS
Em Space  \2003
En Space  \2002
⅓ Em Space  \2004
¼ Em Space  \2005
⅙ Em Space \2006
Thin Space  \2009
Hair Space  \200a
A table of less common HTML whitespace.

Lastly, there is a zero‑width space, for those times when you want a space but don't want a space. But seriously, a zero‑width space provides a wrapping opportunity within a long word without introducing a visible space. Also see the soft hyphen below.

HTML NumberHTML ElementCSS
Zero‑width space&#x200b;<wbr>\200b
Even less common white-less whitespace.

Hyphens and Dashes

Remember, there is a difference between hyphens and dashes; use the right symbol for the right task.

HTML NumberHTML NameCSS
Hy-phen&#x2d;\002d
En–Dash&#x2013;&ndash;\2013
Em—Dash&#x2014;&mdash;\2014
A table of hyphens and dashes codepoints.

There are two other special-case hyphens that might be useful in some cases. The non-breaking hyphen is great for a hyphenated word that makes no sense when it gets split up. The soft hyphen is great for hinting long words, so the browser can break appropriately.

HTML NumberHTML NameCSS
Non‑breaking hyphen&#x2011;\2011
Soft hy­phen&#xad;&shy;\00ad
A table of special-case hyphens.

Quotes

HTML NumberHTML NameCSS
'straight single'&#x27;\0027
"straight double"&#x22;\0022
‘curly single open’&#x2018;&lsquo;\2018
‘curly single close’&#x2019;&rsquo;\2019
“curly double open”&#x201c;&ldquo;\201c
“curly double close”&#x201d;&rdquo;\201d
A table of quotation marks. Better than finger-quotes.

Advanced stylists, pair the CSS property quotes with the <q> HTML element to markup and style quotations.

Math

Best to avoid using a - when you really mean −, and don't use an x or * when you mean ×.

HTML NumberHTML NameCSS
Plus +&#x2b;\002b
Minus −&#x2212;&minus;\2212
Times ×&#xd7;&times;\00d7
Divide ÷&#xf7;&divide;\00f7
Almost-equal-to ≈&#x2248;&asymp;\2248
Not-equal-to ≠&#x2260;&ne;\2260
Less-than-or-equal ≤&#x2264;&le;\2264
Greater-than-or-equal ≥&#x2265;&ge;\2265
Degrees°&#xb0;&deg;\00b0
Prime′&#x2032;&prime;\2032
Double Prime″&#x2033;&Prime;\2033
Triple Prime‴&#x2034;\2034
Middle dot ·&#xb7;&middot;\00b7
A table of useful mathematical codepoints. Ah, what a fine day for science! Dexter
HTML NumberHTML NameCSS
Copyright©&#xa9;&copy;\00a9
Trademark™&#x2122;&trade;\2122
Registered Trademark®&#xae;&reg;\00ae
Service Mark℠&#x2120;\2120
Sound Copyright℗&#x2117;\2117
Legally Typographic

Remember, always consult a lawyer before you start slapping legal symbols around willy-nilly.

The Next Level

Are you are ready to take your typography to the next level? Feel free to consult this list and seriously confusebedazzle your average reader.

HTML NumberHTML NameCSS
Ellipsis…&#x2026;&hellip;\2026
Paragraph &#x00b6;&para;\00b6
Section §&#x00a7;&sect;\00a7
Interrobang‽&#x203d;\203d
A table of uncommon codepoints. Taking typography to the max!

Is That It? Are They Any More?

I'll say! The complete Unicode range consists of a whopping total of 1,114,112 code points... There are a lot more interesting characters to find; however, finding a typeface that supports them is another matter entirely.