En dash (–) in HTML
The en dash is the mid length dash used for ranges and for pairs of equal terms. Its named reference is – and its code point is U+2013.
At a glance
- Character
- –
- Named entity
- –
- Decimal reference
- –
- Hex reference
- –
- Unicode code point
- U+2013
- Unicode name
- EN DASH
- In the entity reference
- Punctuation, and pinned in quick access
In detail
The en dash is nominally one en wide, half an em, which puts it between the hyphen and the em dash. Its main job is a range: page numbers, years, times, scores. Read aloud it means to or through, so 1999 to 2005 written with the dash should never also carry the word from in front of it, because that leaves the sentence with an opening the dash cannot close.
Its second job is joining terms of equal weight where a hyphen would imply a single compound. A hyphen in that position suggests one hyphenated name; the en dash keeps both parties distinct. Style guides differ on how far to take this, but the distinction is real and it is why the character exists separately from the hyphen at all.
In markup you can type the character directly in a UTF-8 document. The entity is useful when a range sits inside generated output, because the literal character is one pixel of difference from a hyphen in most editor fonts and reviewers cannot tell them apart. Writing the name makes the intent visible in the diff.
Ranges written with this character have one very practical failure mode: spreadsheets. A cell containing something that looks like a numeric range will often be coerced to a date or to text depending on locale, and the resulting column is unusable. If your ranges will be exported to CSV, either quote them or use the word to.
Examples
<p>Open 09:00–17:30, Monday–Friday.</p>
<p>See pages 112–118.</p>
<p>The London–Paris route.</p><!-- one compound term -->
<p>a Mexican-American dish</p>
<!-- two distinct entities -->
<p>the Mexican–American border</p>Things that catch people out
- Do not write from 1999 with a dash to 2005. The dash already means to, so pair it with nothing, or drop the dash and write from and to in full.
- A range with spaces around the dash and a range without them are different strings. Pick one and enforce it, otherwise your content search and your sitemap titles will not match each other.
- Some grid fonts render this character at almost exactly hyphen width, so a visual check will not catch a wrong dash. Grep for the code point instead.
Try it: HTML Entity Reference
Search 152 entities across 9 categories, switch the copy format between the character, the name, the decimal form and the hex form, and copy in one click.
HTML Entity Reference
LOCAL · Browser-OnlySearchable reference of 150+ HTML entities with one-click copy in any format
152 entities across 9 categories
Commonly Used
→Arrows(13)
±Math(35)
$Currency(8)
…Punctuation(21)
©Symbols(24)
πGreek(30)
½Fractions(6)
●Geometric(7)
æLatin Special(8)
Click any entity card to copy it in your chosen format. All data is embedded in the page and works offline.
Related HTML entities
All html entities →Em dash (—) in HTML
The em dash at U+2014, its named, decimal and hex references, how it differs from the en dash and hyphen, and the practical reasons to prefer a comma.
Minus sign (−) in HTML
The true minus sign at U+2212 and the hyphen-minus at U+002D. Why negative numbers in a table need the real character, and where it breaks copy and paste.
Middle dot (·) in HTML
The interpunct at U+00B7, its entity forms, its use as a byline separator, its role in Catalan spelling, and how it differs from the bullet and dot operator.
Ellipsis (…) in HTML
The horizontal ellipsis at U+2026 versus three typed periods. Entity forms, line breaking behaviour, search implications and the CSS text-overflow case.
Bullet (•) in HTML
The bullet at U+2022 with its entity forms, why a real list beats a typed bullet, and how to use it as a separator without confusing a screen reader.
Curly quotes: ‘ ’ “ and ”
The opening and closing single and double curly quotes, their entities and code points, when they help prose and when they break code and search.
Tools for this
- HTML Entity Reference Free online HTML entity reference - search and copy HTML entities with live preview
- HTML Entity Encoder Free online HTML entity encoder - encode or decode HTML entities to prevent XSS and display issues