Em Dash

—

An em dash is used to create a strong break in a sentence, adding emphasis or indicating an interruption. It is longer than a hyphen or en dash. It's popular in AI-generated content; however, it has been used by writers for a long time before AI.

Shortcodes

Copy useful codes for em dash symbol — to use in websites, apps, blogs, and docs.

Unicode
U+2014
Alt Code
0151
HTML Code
—
HTML Entity
—
HEX Code
—
CSS Code
\2014
JS/JSON
\u2014
Unix/C/PHP/JAVA
0x2014
URL-encode
%E2%80%94

Customize Em Dash

Customize —, download it as SVG or PNG, or copy the generated HTML snippet.

—
  

How to use Em Dash Symbol in HTML, CSS, and JS

Insert in HTML

1. Direct symbol:
<span>—</span>
HTML Code:
<span>&#8212;</span>
HTML Entity:
<span>&mdash;</span>
HEX Code:
<span>&#x2014;</span>

Add with CSS

.em-dash::before {
  content: '\\2014';
}

Set it in JavaScript

document.querySelector('.em-dash').textContent = '—';
copied