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 Number | HTML Name | CSS | |
---|---|---|---|
Regular Space |   | \0020 | |
Non‑breaking Space |   | | \00A0 |
Figure Space |   | \2007 | |
Tab | 	 | &tab; | \0009 |
But, even that is not it! There are a whole range of typographical spaces that can—and should—be used in specific circumstances.
HTML Number | HTML Name | CSS | |
---|---|---|---|
Em Space |   |   | \2003 |
En Space |   |   | \2002 |
⅓ Em Space |   |   | \2004 |
¼ Em Space |   |   | \2005 |
⅙ Em Space |   | \2006 | |
Thin Space |   |   | \2009 |
Hair Space |   |   | \200a |
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 Number | HTML Element | CSS | |
---|---|---|---|
Z | ​ | <wbr> | \200b |
Hyphens and Dashes
Remember, there is a difference between hyphens and dashes; use the right symbol for the right task.
HTML Number | HTML Name | CSS | |
---|---|---|---|
Hy-phen | - | \002d | |
En–Dash | – | – | \2013 |
Em—Dash | — | — | \2014 |
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 Number | HTML Name | CSS | |
---|---|---|---|
Non‑breaking hyphen | ‑ | \2011 | |
Soft hyphen | ­ | ­ | \00ad |
Quotes
HTML Number | HTML Name | CSS | |
---|---|---|---|
'straight single' | ' | \0027 | |
"straight double" | " | \0022 | |
‘curly single open’ | ‘ | ‘ | \2018 |
‘curly single close’ | ’ | ’ | \2019 |
“curly double open” | “ | “ | \201c |
“curly double close” | ” | ” | \201d |
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 Number | HTML Name | CSS | |
---|---|---|---|
Plus + | + | \002b | |
Minus − | − | − | \2212 |
Times × | × | × | \00d7 |
Divide ÷ | ÷ | ÷ | \00f7 |
Almost-equal-to ≈ | ≈ | ≈ | \2248 |
Not-equal-to ≠ | ≠ | ≠ | \2260 |
Less-than-or-equal ≤ | ≤ | ≤ | \2264 |
Greater-than-or-equal ≥ | ≥ | ≥ | \2265 |
Degrees° | ° | ° | \00b0 |
Prime′ | ′ | ′ | \2032 |
Double Prime″ | ″ | ″ | \2033 |
Triple Prime‴ | ‴ | \2034 | |
Middle dot · | · | · | \00b7 |
Ah, what a fine day for science!Dexter
Legal
HTML Number | HTML Name | CSS | |
---|---|---|---|
Copyright© | © | © | \00a9 |
Trademark™ | ™ | ™ | \2122 |
Registered Trademark® | ® | ® | \00ae |
Service Mark℠ | ℠ | \2120 | |
Sound Copyright℗ | ℗ | \2117 |
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 Number | HTML Name | CSS | |
---|---|---|---|
Ellipsis… | … | … | \2026 |
Paragraph ¶ | ¶ | ¶ | \00b6 |
Section § | § | § | \00a7 |
Interrobang‽ | ‽ | \203d |
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.