Hyphen

Shortcodes

Copy and paste codes for Hyphen symbol ‐ to use in your websites, apps, blogs, and more.

Unicode
U+2010
HTML Code
‐
HEX Code
‐
CSS Code
\2010
JS/JSON
\u2010
Unix/C/PHP/JAVA
0x2010
URL-encode
%E2%80%90
copied

Customize Hyphen Symbol

Customize ‐ symbol as you like and download Hyphen 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 add Hyphen symbol in HTML, CSS, and JS?

Insert ‐ Hyphen using HTML

1. Copy-paste Hyphen directly:
<span>‐</span>
2. HTML Decimal Code:
<span>&#8208;</span>
3. Hexadecimal Code:
<span>&#x2010;</span>
Preview:

Add Hyphen symbol with CSS

.hyphen::before {
    content: '\\2010';
}
Preview: Hyphen

Hyphen JavaScript Code

1. Direct Symbol:
document.querySelector('.hyphen').textContent = '‐';
2. Unicode Escape for ‐:
document.querySelector('.hyphen').textContent = '\u2010';
Preview: