Archive for the 'HTML' Category

The article The Trouble With EM ’n EN (and Other Shady Characters) from A List Apart is a commonly-cited reference to how to use HTML entities to insert characters such as the en-dash (–), the em-dash (—), single quotes (‘ ’), double quotes (“ ”), and the ellipsis (…) into your HTML.

For those who are not familiar with HTML: Since these characters are not standard characters found on your keyboard, the most reliable way to insert them into HTML documents is to use special codes, called an entity, which look like this: & ….

Now, the HTML standard defines very handy, easy-to-remember codes for these characters:

–
—
‘
’
“
”
…

The ALA article, on the other hand, recommends that we use the alternative numeric versions instead:

–
—
‘
’
“
”
…

This advice has gone down as gospel, and is still being preached today (for example, in this presentation on web typography given at the 2007 SXSW festival).

However, the numeric entities are much harder to remember. And the only reason they were recommended in this six-year-old article is that “Netscape 4.x browsers don’t understand many of the named entity references, [so] I’m not going to mention any of them here.”

Today, in 2007, the named entities work in all of the most popular browsers. I’ve tested it. And anyone still using Netscape 4 has already been left behind by the web developer community in bigger ways than a few broken entities. So can we move on, please? I’m tired of remembering those numbers.