February 8, 2012

Insert an n-dash or m-dash on a web page or blog

After writing about the n-dash and m-dash, I was surprised to find these are some of the most popular posts in my blog. There are a lot of people searching about the n-dash on Google!

I’ve just realised I left something out: How to use the n-dash or m-dash on a web page or on a blog.

It is pretty easy…

HTML editing is the best place to get the details right with formatting and punctuation. If you paste from Word into a web page or blog, often you’ll get lots of unwanted formatting. But that’s another topic – let’s stick to the dashes.

The n-dash and m-dash in HTML

  • n-dash in HTML, type: –
  • m-dash in HTML, type:  —

If you are using Dreamweaver, it will auto-fill these very quickly when you start typing them.

In most blog or web content systems, you’ll need to use the built-in html editor to manually enter the n-dash or m-dash after you’ve entered your new content. If you need to correct more than one, just copy it (eg. –) and then paste it as needed.

A quick review: What is the hyphen, n-dash or m-dash?

- hyphen

– n-dash (or en-dash)

— m-dash (or em-dash)

For more details about using this punctuation in your writing, see this post about how to use the hyphen, n-dash and m-dash.

Speak Your Mind

*