Em Dash

Shortcodes

Copy and paste codes for Em Dash symbol — to use in your websites, apps, blogs, and more.

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
copied

Customize Em Dash Symbol

Customize — symbol as you like and download Em Dash as SVG or PNG or copy its HTML code to use in your projects.

Preview helps customize symbol. Downloaded image and HTML code may have size/spacing differences.
 

How to type Em Dash symbol — ?

Using Em Dash Alt Code:

You can type the Em Dash symbol — using your keyboard by using the Alt Code for Em Dash. Before you begin, ensure that your Num Lock is turned on, and use the Numpad to type the code. Then, follow these simple steps:

  1. Hold down the Alt key on your keyboard.
  2. Type the number 0151 using the Numpad.
  3. Release the Alt key.

This will make the — appear on your screen.

How to add Em Dash symbol in HTML, CSS, and JS?

Insert — Em Dash using HTML

1. Copy-paste Em Dash directly:
<span>—</span>
2. HTML Decimal Code:
<span>&#8212;</span>
3. HTML Entity:
<span>&mdash;</span>
4. Hexadecimal Code:
<span>&#x2014;</span>
Preview:

Add Em Dash symbol with CSS

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

Em Dash JavaScript Code

1. Direct Symbol:
document.querySelector('.em-dash').textContent = '—';
2. Unicode Escape for —:
document.querySelector('.em-dash').textContent = '\u2014';
Preview: