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 this is a very popular topic.

A reader asked for details about how to insert an n-dash or m-dash on a web page or blog.

It is pretty easy…

HTML editing is where you can get all the details right with formatting and punctuation. But first, does your blog or website let you paste from Word? Menu buttons for pasting from Word are common.  Try it out, using some text that has the n-dash and m-dash.  Publish your content to the web and check: Are the dashes right?  If yes, you’re done.  If not, then html should be your friend!

The n-dash and m-dash in HTML

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

In most blogs or website management systems, you’ll need to enter your content with hyphens instead of dashes to begin with. This assumes you’re typing it directly, not using Word.

When you’re done writing, view your writing in html. (Most blogs and website editors have an html view option.) Spot all the places where there’s a hyphen that doesn’t belong; you can insert the n-dash or m-dash. in its place.  If you need to correct more than one, just copy it (eg. –) and then paste it wherever there’s a hyphen that should be a dash.

Remember to enter the m-dash with no spaces next to the adjacent letters. The n-dash should have a space on each side.

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, read:

How to use the hyphen, n-dash and m-dash

Insert the n-dash and m-dash easily using Microsoft Word




Leave a Reply

Your email address will not be published. Required fields are marked *