and other shady characters
Why em and em dashes are important, how to properly use them, and how to insert them in Web pages and other electronic documents.
The Dawn Of The Web has frequently been compared to the invention
of the printing press. But the web has also destroyed one of the greatest features of nearly every press since Gutenberg: the ability to publish pleasing type.
The printing press gave us type that was clearer and easier to read than that produced from a typewriter, because the typesetter had additional tools at his disposalâ€”and knew how to use them. The web has cost us some of those tools.
Lack of tools and knowledge
There are two problems here. The first is that until HTML 4 came along, the web was missing almost all of these tools (itâ€™s still missing many important ones).
But the larger problem is, now that theyâ€™re available, almost no one publishing on the web today knows how to use themâ€”or often even knows of their existence.
Read this, though, and youâ€™ll understand the answers to both problems far better than almost anyone else, including your English teachers.
Most HTML References Are Wrong
Iâ€™ve lost count of all the books, articles, and websites that claim an em dash is â€œ
—â€â€”but theyâ€™re all wrong. The entire range from
Ÿ are invalid characters, and consequently should not be used.
Since Netscape 4.x browsers donâ€™t understand many of the named entity references (such as
’ for a right single quote), Iâ€™m not going to mention any of them here.
Do we Decimal?
The most reliable way to insert special characters by far is to use decimal entity notation. Some characters have four methods of reference: named, decimal, hexadecimal, and UTF-8 (Unicode), but only the decimal form is reliable across browsers and platforms. Use the others if you wish, but only if you want to be bombarded by Netscape 4.x users complaining about your â€œcorruptedâ€ pages.
UTF-8 encoding to the rescueâ€”almost
The only way to insert these characters (and any character beyond 127) properly without using entity codes is to use the UTF-8 character encoding (the default for XHTML and XML documents).
Unfortunately, very few text editors support this, and many more browsers choke on UTF-8 characters than do on named entities, so donâ€™t use them unless you donâ€™t give a hoot about Netscape 4 users.
(FrontPage and Dreamweaver donâ€™t insert most of these characters properly, so donâ€™t rely on their â€œinsert symbolâ€ tools either.)
Hyphens are Not Dashes
Stop! Go back and re-read the subhead aboveâ€”at least 2â€“3 timesâ€”then let it sink in before continuing.
The sentence above illustrates the proper use of the hyphen and the two main types of dashes. They are not the same, and must not be confused with each other. In some fancy fonts the difference is more than just the widthâ€”hyphens have a distinct serif. If you donâ€™t know the rules already, letâ€™s review them. First, though, a definition:
An â€œemâ€ is a unit of measurement defined as the point size of the fontâ€”12 point type uses a 12 point â€œem.â€ An â€œenâ€ is one-half of an â€œem.â€
Though some of the finer points in the rules are complex, their basic applications are clear-cut and their misuse easily identifiable. First, neither an em dash nor an en dash should be confused with the hyphen (-), which is used to join compound words together.
The correct use of em and en
The em dash (
—) is used to indicate a sudden break in thought (â€œI was thinking about writing aâ€”what time did you say the movie started?â€), a parenthetical statement that deserves more attention than parentheses indicate, or instead of a colon or semicolon to link clauses. It is also used to indicate an open range, such as from a given date with no end yet (as in â€œPeter Sheerin [1969â€”] authored this document.â€), or vague dates (as a stand-in for the last two digits of a four-digit year).
Two adjacent em dashes (a 2-em dash) are used to indicate missing letters in a word (â€œI just donâ€™t fâ€”â€”ing care about 3.0 browsersâ€).
Three adjacent em dashes (a 3-em dash) are used to substitute for the authorâ€™s name when a repeated series of works are presented in a bibliography, as well as to indicate an entire missing word in the text.
The en dash (
–) is used to indicate a range of just about anything with numbers, including dates, numbers, game scores, and pages in any sort of document.
It is also used instead of the word â€œtoâ€ or a hyphen to indicate a connection between things, including geographic references (like the Masonâ€“Dixon Line) and routes (such as the New Yorkâ€“Boston commuter train).
It is used to hyphenate compounds of compounds, where at least one pair is already hyphenated (as in â€œNetscape 6.1 is an Open-Sourceâ€“based browser.â€). The Chicago Manual of style also states that it should be used â€œWhere one of the components of a compound adjective contains more than one word,â€ instead of a hyphen (as in â€œNetscape 6.1 is an Open Sourceâ€“based browserâ€). Both of these rules are for clarity in indicating exactly what is being modified by the compound.
Other sources also specify the use of an en dash when referring to joint authors, as in describing a â€œBoseâ€“Einstein Condensateâ€. Some also prefer it to a hyphen when text is set in all capital letters.
Some typographers prefer to use an en dash surrounded by full spaces instead of an em dash. Others prefer to insert hair spaces on either side of the em dash, but this is problematic with some web browsers (see the section on spaces for more detail).
That hyphen you can insert with the key next to the zero on your keyboard is an ambiguous character suffering from an identity crisis. It canâ€™t decide if itâ€™s a hyphen, a minus, or an en dashâ€”in fact, the Unicode specification describes it as â€œhyphen-minusâ€ and defines very specific replacements for each of its personalities.
Use it if you need to insert a hyphen, but never for a minus (
−) or a dash, since it does not have the correct width for either, or the vertical position for the latter (compare â€œ1+4-2=3â€ to â€œ1+4âˆ’2=3â€).
The soft hyphen (
­ a.k.a. â€œdiscretionary hyphenâ€ and â€œoptional hyphenâ€) is to be used for one purpose onlyâ€”to indicate where a word may be broken at the end of a line. Otherwise, it is to remain invisible and not affect the appearance of the word.
Some browsers display it no matter where it falls, but this is not the correct behavior. Others in the past have recommended against its use because its behavior was not well-defined, but the HTML 4.01 spec makes its use and behavior clear and unambiguous.
Three other hyphen characters exist in Unicode, but are unfortunately not defined in the HTML entity set (although they should be):
- The non-breaking hyphen (
‑not in HTML) does just what its name implies.
- The hyphen character (
‐not in HTML) is meant to be used in place of the hyphen-minus when a hyphen is exactly the desired character.
- The hyphenation point (
‧not in HTML) is that bullet-like character you find in some dictionaries to separate syllables. That is its only use, but if youâ€™re creating an online dictionary, using it will make your entries look more professional.
There are fifteen space characters defined in Unicode. Thatâ€™s right, fifteen. Most arenâ€™t defined in HTML, and you can ignore many of these. Though many should be a part of the web, letâ€™s deal with the ones that are defined first.
A normal space (a.k.a. â€œword spaceâ€) is your trusty old friend coming in at
The non-breaking space (
), commonly found in otherwise-empty table cells, is safely referred to by either its numeric or named entity reference in all 3.0-level and higher browsers.
Off by a hair
I said earlier that some prefer to surround single em dashes with a hair space (
not in HTML), which is between one-tenth to one-sixteenth of an em, but it isnâ€™t defined in HTML 4.01.
The thin space (
) is the most similar space character which is defined in HTML. It is supposed to be one-fifth of an em in width, but is almost always rendered much wider. The only font Iâ€™ve found with a correctly-designed hair space in is Arial Unicode MS, and it renders both with almost exactly the same width.
Bottom-line: Unless you can be sure that your target audience has Arial Unicode MS installed, neither of these spaces has anything close to the desired and correct appearance.
Em and en spaces
The last two spaces in the HTML repertoire are the en space (
) and the em space (
). Can you guess how wide each is?
Both are visibly wider than a normal space, and once again, Arial Unicode MS is the only mainstream font that includes both, even though they are part of the official HTML 4.01 specification.
That leaves the spaces defined by Unicode but not HTML. Use them at your own risk:
Sometimes in typesetting you need to provide a hint that the computer can break a long word in a particular position without any other interpretation or visible indication. This is the zero width space (
​ not in HTML). Itâ€™s not defined in HTML 4.01, and it doesnâ€™t work in IE unless youâ€™re using Arial Unicode MS.
Its evil twin is the zero width no-break space (
﻿ not in HTML), which can (theoretically) be used to keep a word from breaking at that point. Strangely, though this isnâ€™t defined in HTML either, it works as-designed in IE6/Win.
Donâ€™t Misquote Me
Iâ€™m going to make life easy on you here (well, mostly). There are actually fourteen quotation characters. (Eighteen if you count the big, bold versions in the Dingbats section of Unicode.) Iâ€™m going to pretend that most of them donâ€™t existâ€”youâ€™ll only need them for foreign languages anyway.
Newspapers of (broken) record
Methods for correctly inserting curly quotes in web pages are not well understood. Do not, under any circumstances, use
• for curly quotes.
Donâ€™t ever trust the 8-bit representations to be correct, because they almost certainly wonâ€™t be. The biggest problem is that many web browsers assume that 8-bit characters refer to the local character system, translating your curly quotes or dashes into Greek or accented Latin characters on other platforms. These same browsers always get the numeric entity references right.
And donâ€™t ever try to
``fake itÂ´Â´ with doubled-up grave accents and straight single quotes or acute accents, as most of the
``best-known newspapers" do.
‘for an opening single quote (Ctrl + ` ` in Wordâ€”thatâ€™s two grave accentsâ€”that character on the tilde key).
’for a closing single quote (or an apostrophe) (Ctrl + ” in Word).
“for an opening double quote (Ctrl + ` ” in Word).
”for a closing double quote (Ctrl + ‘ ” in Word).
Iâ€™ll bet you didnâ€™t know this about HTMLâ€”the
<blockquote> elements are designed to have quote marks automatically inserted in the appropriate locations. No current browser does this by default, however, and even those that do when faced with the appropriate style sheet markup (as detailed in CSS) get it wrong, especially with curly quotes.
HTML 4.01 mandates that this occur for the
<q> element, and advises authors against placing quotes manually, since this could result in double quotes.
My suggestion: Avoid the use of
<q> entirely until this is widely supported, and either do the same with
<blockquote> (possible because indented paragraphs are implied to be quotations by convention
in the English language), or place the automatic quote code in your style sheet and tolerate the fact that some browsers will produce garbage. (Or, just define all of these quotes to be plain-old straight quotes, and avoid most of the problems.)
This is such a shame, since CSS can automatically apply one of the forgotten rules about quotes: When quoting multiple paragraphs, each one begins with an opening quote, but only the last paragraph has a closing quote. Oh, wellâ€¦
Many people (most, from what Iâ€™ve observed) believe that curly single opening and double opening quotes are the correct symbols for feet and inches. If you are one of these people, put out your hand so I can slap it with a ruler.
The correct symbols to use are prime and double prime. They look similar to curly quotes in a few fonts, but are usually much more distinct. They never, ever look like commas. They are usually set at a slight angle of 75â€“80 degrees, and are also usually tapered from the top to the bottom.
A single prime is used to represent feet or minutes (
′ not in HTML 4.01), while a double prime is used to indicate inches or seconds (
″ not in HTML 4.01). (I wonâ€™t make you learn about the triple prime and the three reversed versions of these characters.)
Finally, here are some fine points on the use of the ellipsis (
- An ellipsis is most often used to indicate one or more missing words in a quotation. It is also used to indicate when a thought or quotation trails off.
- When it occurs at the end of a sentence, it should be treated in one of three ways, depending on usage:
- If the ellipsis is being used to indicate one or missing words in the sentence, then it should be followed by a period.
- If it indicates one or more missing sentences, then it should appear after the period of the preceding sentence, and with a space on either side.
- But if it indicates that the thought or quote is just trailing off at the end of a sentence, then only the ellipsis is used, to clarify that no words from a quotation were omitted, as would be the case if the additional period were there.
There are more shady characters lurking in the background, but the ones described above are the most common and important.
In conclusion, I could tell you about all the places where you should be using the one dot leader (
․ and not in HTML 4.01) instead of the plain old period, but that would just be too cruel. Besides, all you really need to know is the periodâ€™s official Unicode nameâ€”full stop.
Version 2.0â€”May 27, 2002
- William Strunk: Elements of Style
- W3C HTML 4.01 entity definitions
- Unicode Consortium
- International System of Units
- Chapter 3 of NASAâ€™s A Handbook for Technical Writers and Editors is of great help even if you donâ€™t write about technical subjects.
- Jukka Korpela provides a great amount of detail on specific characters as part of a larger series on characters, and a great deal of additional web authoringâ€”related information.
- Got a detailed question about which characters allow line breaks to occur? An update to the Unicode specification has all the answers
- Special Characters for the Web
- HTML 4.01 Presentation/Typesetting Test
- Misunderstood Characters & Typesetting Characters
- Textism offers a Word to HTML converter.
- Also try this for more.
After using Google to find out how
many pages have linked to the ALA version of this article, I couldnâ€™t resist posting the highlights:
- W3C Style Sheets homepage
- 2001-10-19 A List Apart has published two interesting articles about typographic errorsâ€¦
- Evheadâ€™s Blog
- Evan Williams is the guy who created Bloggerâ€”arguably the best-known Web log software and community.
- Microsoft Typography
- A great resource on Web-related typography in its own right.
- Webreference newsletter
- More than you ever wanted to know about dashes, spaces, curly quotes, and other vagaries of online typography.
- What Do I Know
- In Iâ€™m down with em & en Todd Dominey writes, â€œFortunately, Peter K .Sheerin has drafted a kick ass articleâ€¦â€.
- — and all that
- Dr. Bonzo provides a good technical history of how the bad habit of using invalid character references got started.
- Web-graphics discussion
- Apparently, my article sparked a discussion about the automated conversion of straight quotes and hyphens to their correct typographical versions, which resulted in two automatic replacement programs.
- A small step for web typography
- A Textpad macro that converts quotation marks and dashes with one keypress.
- Entity replacement