Hyphen-minus

-

Shortcodes

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

Unicode
U+002D
Alt Code
45
HTML Code
-
HEX Code
-
CSS Code
\002D
JS/JSON
\u002D
Unix/C/PHP/JAVA
0x2D
URL-encode
-

Customize Hyphen-minus

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

-
  

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

Insert in HTML

1. Direct symbol:
<span>-</span>
HTML Code:
<span>&#45;</span>
HEX Code:
<span>&#x002D;</span>

Add with CSS

.hyphen-minus::before {
  content: '\\002D';
}

Set it in JavaScript

document.querySelector('.hyphen-minus').textContent = '-';
copied