Non-breaking Hyphen

Shortcodes

Copy useful codes for non-breaking hyphen symbol ‑ to use in websites, apps, blogs, and docs.

Unicode
U+2011
HTML Code
‑
HEX Code
‑
CSS Code
\2011
JS/JSON
\u2011
Unix/C/PHP/JAVA
0x2011
URL-encode
%E2%80%91

Customize Non-breaking Hyphen

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

  

How to use Non-breaking Hyphen Symbol in HTML, CSS, and JS

Insert in HTML

1. Direct symbol:
<span>‑</span>
HTML Code:
<span>&#8209;</span>
HEX Code:
<span>&#x2011;</span>

Add with CSS

.non-breaking-hyphen::before {
  content: '\\2011';
}

Set it in JavaScript

document.querySelector('.non-breaking-hyphen').textContent = '‑';
copied