Hyphen-minus

-

Shortcodes

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

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

Customize Hyphen-minus Symbol

Customize - symbol as you like and download Hyphen-minus 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 Hyphen-minus symbol - ?

Using Hyphen-minus Alt Code:

You can type the Hyphen-minus symbol - using your keyboard by using the Alt Code for Hyphen-minus. 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 45 using the Numpad.
  3. Release the Alt key.

This will make the - appear on your screen.

How to add Hyphen-minus symbol in HTML, CSS, and JS?

Insert - Hyphen-minus using HTML

1. Copy-paste Hyphen-minus directly:
<span>-</span>
2. HTML Decimal Code:
<span>&#45;</span>
3. Hexadecimal Code:
<span>&#x002D;</span>
Preview: -

Add Hyphen-minus symbol with CSS

.hyphen-minus::before {
    content: '\\02D';
}
Preview: Hyphen-minus

Hyphen-minus JavaScript Code

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