HTML Entity for En Dash (–)

What You'll Learn
How to display the En Dash (–) in HTML using hexadecimal, decimal, named entity, and CSS escape methods. This character is U+2013 (EN DASH) in the General Punctuation block (U+2000–U+206F)—shorter than the em dash (—) and longer than the hyphen-minus (-).
Render it with –, –, the named entity –, or CSS escape \2013. Use en dashes for ranges and spans (e.g. 2020–2025, pages 10–20); use em dashes for breaks in thought, not ranges.
⚡ Quick Reference — En Dash
U+2013General Punctuation
–Hexadecimal reference
–Decimal reference
–Most common in HTML
Name Value
──────────── ──────────
Unicode U+2013
Hex code –
HTML code –
Named entity –
CSS code \2013
Related U+2014 = Em dash (— —); U+002D = Hyphen-minus (-)Complete HTML Example
This example demonstrates the En Dash (–) using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\2013";
}
</style>
</head>
<body>
<p>En Dash using Hexadecimal: –</p>
<p>En Dash using HTML Code: –</p>
<p>En Dash using HTML Entity: –</p>
<p id="point">En Dash using CSS Entity: </p>
</body>
</html>🌐 Browser Support
The En Dash entity is universally supported in modern browsers:
👀 Live Preview
See the en dash (–) in range examples and compared with em dash (—) and hyphen (-):
– – vs — —🧠 How It Works
Hexadecimal Code
– uses the Unicode hexadecimal value 2013 to display the en dash. The x prefix indicates hexadecimal format.
Decimal HTML Code
– uses the decimal Unicode value 8211 to display the same character.
Named Entity
– is the standard named entity for U+2013. It is readable and easy to remember for ranges and spans in HTML.
CSS Entity
\2013 is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.
Same visual result
All four methods produce the en dash: –. Unicode U+2013 in the General Punctuation block (U+2000–U+206F).
Use Cases
The En Dash (–) commonly appears in:
Years, seasons, or periods (2020–2025).
Pages, chapters, scores (10–20).
Articles and blogs with proper typographic spans.
Compound links (New York–London flight).
Version ranges and specification spans in technical writing.
Schedules, events, and product lineups with clear ranges.
💡 Best Practices
Do
- Prefer
–for ranges and spans in HTML - Use en dash for 2020–2025, not em dash or hyphen
- Serve pages with UTF-8 (
<meta charset="utf-8">) - Match your style guide for spaces around en dashes
- Test rendering with your site’s body font
Don’t
- Use – for sentence breaks (use — em dash instead)
- Confuse – (en) with — (em) or - (hyphen)
- Use a hyphen-minus in published date ranges
- Put CSS escape
\2013in HTML text nodes - Mix entity styles randomly in one file
Key Takeaways
Three HTML references plus CSS all render –
– – –For CSS stylesheets, use the escape in the content property
\2013Unicode U+2013 — General Punctuation en dash
– is the standard named entity
Em dash is — (—, U+2014), longer than en
❓ Frequently Asked Questions
– (hex), – (decimal), – (named), or \2013 in CSS content. All produce –.U+2013 (EN DASH). General Punctuation block (U+2000–U+206F). Hex 2013, decimal 8211.–) is shorter and used for ranges and connections. The em dash (—, U+2014, —) is longer and used for breaks in thought or emphasis in sentences.–, –, or –) go directly in markup. The CSS escape \2013 is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers of the stack.Explore More HTML Entities!
Discover 1500+ HTML character references — punctuation, math symbols, and more.
8 people found this page helpful
