HTML En Dash Code

This page contains HTML code for adding an en dash within the text of your website or blog.

The en dash is a punctuation mark that can be used to range a span of numbers, report results or scores, represent conflict, connection, or direction, or for compound adjectives. It should not be confused with the em dash — which can be used in place of commas, parentheses, or colons.

Create an En Dash

To create an en dash in HTML, use the appropriate HTML entity. Type either the entity number or entity name where you'd like the en dash to appear.

HTML Entity Number

Here's how you use the HTML entity number to display an en dash.

Source CodeResult

HTML Entity Name

This example uses the entity names to display the en dash.

Source CodeResult

Usage Example

Here's an example of using an en dash within a sentence.

Source CodeResult

The taxman is auditing all my income between 1847–2014!

En Dash vs Em Dash

An en dash could easily be mistaken for an em dash or even a hypen — especially to the untrained eye. This is because the only difference (visually) between those three characters is their width. The em dash is the widest. The en dash is slightly narrow than the em dash, and the hypen is slightly narrower again.

All three have different purposes, so be sure to use the correct character for your intended purpose.