In case you didn’t know it, WordPress has a couple of built-in auto-formatting features that are really helpful — the em dash and the en dash. These two styles are often used to separate content, with the em dash used quite often in lieu of a comma. If you are unfamiliar with these terms, the en dash is the width of the let N, and the em dash is the width of the letter M. The en dash is not often used but can be used between dates or other sequences (e.g., 1–50). According to the AP Style Guide, which only uses hyphens and em dashes, the em dash is used to signal abrupt change; as one option to set off a series within a phrase; before attribution to an author or composer in some formats; after datelines; and to start lists.
Hyphens and Dashes
When writing content, you often need to put breaks between words or content. While the traditional hyphen is easy, the others are not as straightforward until you know about them. To use the em dash and en dash in WordPress, the implementation is easy:
- A standard hyphen (-) uses a single hyphen
- An en dash (–) is generated when two hyphens are used together – –
- An em dash (—) is generated when three hyphens are used together – – –
Sometimes you need to demonstrate two hyphens — such as CSS variables (- -awb-color1) and possibly three, as in the example above. To bypass this auto-formatting, just put a space between each hyphen. This works in the core WordPress Editor (aka Gutenberg) as well as the classic editor employed by Avada.
Originally published on Oct. 2, 2022