Use an em dash sparingly to set off parenthetical material in a sentence — for example, to separate an example from the main clause. Add a space before and after the dash.
To ensure correct line breaking, sometimes you might need to use a non-breaking space before the em dash.
Typing the em dash:
- Windows: ALT+0151
- MacOS: SHIFT+OPTION+-
- XML/HTML:
—
Don't use an en dash, a hyphen, two hyphens, or other variant punctuation to substitute for an em dash.
Styleguides vary in their advice about including spaces around an em dash. We have chosen to be consistent with AP.
Visit your grandma -- the one with the blue hair -- before she dyes it red!
Visit your grandma - the one with the blue hair - before she dyes it red!