Friday, October 20, 2006

[HTML] em dash character

I'm having a problem with em dashes. I'm fond of asides set off by this piece of punctuation, but HTML doesn't seem to share my passion. As far as I know, there's no semantic em dash token (along the lines of amp, eacute, and so forth). I've been using the numeric code that often maps to an em dash (151), but that has always been subject to the whim of the encoding scheme in the browser, and lately that's broken for a number of my readers. In particular, Bloglines now renders my em dashes as ? or little boxes with a's in them, or whatever.

So what do other folks do for em dashes? It seems silly to write modern text as if I were still using a typewriter, with -- serving the purpose, but I may have to resort to that if I can't figure out a consistent way to get the appropriate punctuation to show up in browsers et al.

Any ideas?

[Update: I wrote this and then went searching for the answer elsewhere. A good article can be found at http://alistapart.com/articles/emen/. But I thought I'd do the post anyway so that anyone who had the same question could still learn from it.]

This Post was written by Derrick from An Obsession with Food.

11 comments:

I am Jack's Brain said...

Have you tried —? It seems to work.

I am Jack's Brain said...

Make that "‐".

I am Jack's Brain said...

Arggg..... "&mdash"!

cookiecrumb said...

Derrick: Here's an HTML keyboard I use for funny characters:
http://www.foxinternet.co.uk/keyboard.html

Just click on the symbol you want to use and you'll get the code for it. Paste the code right into your text and it publishes as the symbol you want. Wow. Extra steps, yes, but it works.

Catherine said...

& 8212 without the space

sandye said...

dear derrick,

have you tried using this html code:



i found it here (way down on the page):

http://www.ascii.cl/htmlcodes.htm

sandye said...

derrick,

that seemed to work a little too well! no matter how i try to disguise it, it comes out as the em dash! just scroll way down on the page, ok?

or try this--just remove the spaces!

& # 8212 ;

Derrick said...

Hey, everyone, thanks. Indeed — seems to be the key if you want to use the semantic token (as opposed to —, the decimal representation). There's also – for those who really want to be pedantic.

qishaya said...

Original christian shoes are first category in alter. They are so much appealing louboutin shoes so, ample of women can not pause to get their hands on them. cheap christian louboutin However, these shoes are not economical. christian louboutin So adequate of women cannot present these shoes. christian louboutin heels Christian Louboutin Replica is presenting the textbook thing for these people. christian louboutin sandals It is present masses of fashionable shoes in an economical rate. christian pumps You know that unique shoes are posh to buy. christian sandals Nevertheless do not think that exchange a shoe with christian louboutin pumps magnificent create of top trait is hard. Now a time model are presented. louboutin pumps But if you hardship attribute cargo look discount christian louboutin for these replicas in a trustworthy position & set an order for your beloved shoes christian louboutin sale

longge said...

Buy lv online to save money. If you decide to buy a replica louis vuitton handbags for yourself or someone important you can start by shopping online for lv handbag
. You will find that Louis offers a large selection of handbags to choose from. There are several online stores that offer discounts on these handbags. One in particular store being eBay that offers a vast selection of louis vuitton bag
for much lower prices.

太子 said...

When you are shopping for a Coach handbags , it is important that you distinguish between what is real and what is a fake. While you may think that Coach Bonnie that you are buying is certifiably authentic, that may not be the case. Although you may be certain that the Coach Wristlet that you are purchasing is without a doubt an authentic item, it is important to determine if Coach Ergo truly is.


The ever popular ED clothing does it again with his incredible ED Hardy Shoes ! ED Hardy Shoes has put together a line of women’s boots that are original, unique, and sought after all across the world. Worn by women of all ages, hardy shirtare a combination of tattoo culture and vintage fashion with designs that will blow you away.