Dashes Edit

Highlight: Use an em dash, to set off a break in the flow of a sentence. Use an en dash to indicate a range of numbers, the minus sign, or negative numbers.

Em dashes

Use an em dash (—) also known as a long dash, to set off a break in the flow of a sentence. Em dashes are also used to provide emphasis for parenthetical phrases more than parentheses themselves. Don’t add spaces before and after the em dash. Don’t capitalize the first word after an em dash unless the word is a proper noun.

Use one em dash on each side of the phrase that is to be embedded.

Examples

Not recommended: You can edit your theme — including the appearance, colors, and design — in the styles.css file.

Recommended: You can edit your theme—including the appearance, colors, and design—in the styles.css file.

You can also use one em dash to initiate a phrase at the end of a sentence.

Example

Recommended: If you’re stuck on a particular step, visit the FAQs page—it has a comprehensive list of common errors, problems, and their solutions.

Don’t use an em dash as a bullet in a list. For more information, see Lists. Avoid using an em dash to indicate empty or unoccupied elements such as text fields, cells, and other values.

Top ↑

Typing em dashes

HTML
—

macOS
Press Option+Shift+hyphen.

Linux desktop environment
Enable the Compose key. (Instructions for doing that vary depending on your Linux distribution.) After the Compose key is enabled, you can create an em dash by typing the Compose key followed by three hyphens.

Alternatively, press Control+Shift+U, then let go of those keys, then type 2014, then press either the Return key or the Ctrl/Shift keys.

Note: These Linux options don’t work if you’re signed in to the Linux command line from a remote system using ssh or the like; you have to be in a Linux desktop environment.

Windows
Turn num lock on, then hold down the left Alt key and type 0151 on the numeric keypad.

Top ↑

En dashes

En dashes (–) are generally used to indicate a range of numbers, the minus sign, or negative numbers. Although you can use en dashes for these purposes, you can also use hyphens or the word to for numerical ranges.

Use an en dash indicate a range of numbers such as values or dates. Don’t add spaces before and after the en dash.

Examples

Not recommended: The program was under active development from 2012 – 2017.

Recommended: The program was under active development from 2012–2017.

Recommended: Select a range from 10–60 px as the width of the button.

Use an en dash to indicate negative numbers and the minus sign. While writing an equation with a minus sign, insert a space before and after the minus sign (en dash). Contrarily, while writing a negative sign (en dash), don’t insert a space after it but do insert one before the sign.

Examples

Not recommended: Enter the CAPTCHA: 20–6=14.

Recommended: Enter the CAPTCHA: 20 – 6 = 14.

Not recommended: The value of the variable must be– 3.

Recommended: The value of the variable must be –3.

For more information, see Ranges of numbers, Range of numbers with units, and Numbers and fractions.

Don’t use an en dash as a bullet in a list. For more information, see Lists. Avoid using an en dash to indicate empty or unoccupied elements such as text fields, cells, and other values.

Don’t use an en dash to indicate a range of times. Use the word to instead of the en dash. Use an en dash with no surrounding spaces for a schedule or listing.

Examples

Recommended: The server was down from 3:00 AM to 5:00 AM.

Recommended: The meeting is scheduled from 15:00–16:00 UTC.

In contrast, for date ranges consisting of two dates and times, use an en dash with spaces surrounding the dash.

Examples

Recommended: 7:30 AM–9:15 AM 05/11/2020 (time range on a single day)

Recommended: 7:30 AM 04/11/2020 – 9:15 AM 05/11/2020 (date and time range)

For more information, refer Dates and times.

Top ↑

Typing en dashes

HTML
–

macOS
Press Option+hyphen.

Linux desktop environment
Enable the Compose key. (Instructions for doing that vary depending on your Linux distribution.) After the Compose key is enabled, you can create an em dash by typing the Compose key followed by two hyphens.

Alternatively, press Control+Shift+U, then let go of those keys, then type 2013, then press either the Return key or the Ctrl/Shift keys.

Note: These Linux options don’t work if you’re signed in to the Linux command line from a remote system using ssh or the like; you have to be in a Linux desktop environment.

Windows
Turn num lock on, then hold down the left Alt key and type 0150 on the numeric keypad.

Top ↑

Colons instead of dashes in lists

Sometimes writers use em dashes, en dashes, or hyphens surrounded by spaces in lists to separate a title or heading with its description. Ideally, use colons or description lists for separating them.

Examples

Not recommended: Getting started with WordPress hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. – Introduction

Recommended: Getting started with WordPress hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same.: Introduction

Not recommended: You can install WordPress on one of the following operating systems – Windows, macOS, or Linux.

Recommended: You can install WordPress on one of the following operating systems: Windows, macOS, or Linux.

Top ↑

Additional resources

Last updated: