Minus Sign

Shortcodes

Copy useful codes for minus sign − to use in websites, apps, blogs, and docs.

Unicode
U+2212
HTML Code
−
HEX Code
−
CSS Code
\2212
JS/JSON
\u2212
Unix/C/PHP/JAVA
0x2212
URL-encode
%E2%88%92

Customize Minus Sign

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

  

How to use Minus Sign in HTML, CSS, and JS

Insert in HTML

1. Direct symbol:
<span>−</span>
HTML Code:
<span>&#8722;</span>
HEX Code:
<span>&#x2212;</span>

Add with CSS

.minus-sign::before {
  content: '\\2212';
}

Set it in JavaScript

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