More
More
Em Dash HTML entity —
— is the HTML entity for Em Dash — (U+2014). Copy the decimal — and hex — codes plus CSS, JavaScript, Python and URL escapes.
- Entity
—- Code point
- U+2014
- Unicode name
- EM DASH
- Block
- General Punctuation
- Category
- Dash punctuation (Pd)
- Since
- Unicode 1.1
- Defined in
- HTML 4.01 and HTML5
Codes to copy
| HTML named | —Works in HTML; in XML only & < > " ' are predefined. | |
|---|---|---|
| HTML decimal | —Works in HTML and XML. | |
| HTML hex | —Works in HTML and XML. | |
| CSS | content: "\2014";In a stylesheet, for ::before and ::after. | |
| JavaScript | "\u2014"Also valid in JSON. | |
| Python | "\u2014"Python 3 string literal. | |
| Python by name | "\N{EM DASH}"Readable alternative using the Unicode name. | |
| URL | %E2%80%94Percent-encoded UTF-8 bytes, for a path or query value. | |
| UTF-8 bytes | E2 80 943 bytes. | |
| UTF-16 | 20141 code unit, which is what JavaScript length counts. |
When to use it
The em dash, roughly the width of a capital M, sets off a phrase or marks a break in a sentence. Chicago style sets it without spaces and AP style with them; British style often uses a spaced en dash (–) for the same job. It is longer than both the en dash and the hyphen on the keyboard.
The name dates from HTML 4, so it works in every browser and in old email clients.
More punctuation and typography
‖Double Vertical Line‐Hyphen‘Left Single Quote˝Double Acute Accent’Right Single Quote˜Small Tilde‚Single Low Quote˛Ogonek
All punctuation and typography · Every HTML entity · Encode or decode text
Source: the WHATWG HTML Standard list of named character references and the Unicode Character Database (Unicode 18.0).