-
Hyphen-Minus
- Unicode
- U+002D
- Category
- Punctuation
- Symbol Sets
- Dashes and Hyphens
- HTML Entity
- -
- CSS
- \002D
The hyphen-minus (-) is the short horizontal stroke on every keyboard, right of the 0 key. ASCII gave it two jobs at once, which is where the double name comes from: it joins words (well-known, e-mail) and it stands in for the minus sign (5 - 3). Typography has a dedicated character for each job — the true hyphen ‐ (U+2010), the minus sign − (U+2212), the en dash – for ranges and the em dash — for breaks in a sentence — but the keyboard only offers this one.
In everyday text the hyphen-minus is perfectly correct between parts of a compound word. Word processors such as Microsoft Word and Google Docs replace " - " typed between spaces with an en dash automatically; if you need a real dash elsewhere, copy it from the dashes set. On a phone the hyphen sits on the first symbols page (123 on iPhone, ?123 on Android).
In everyday text the hyphen-minus is perfectly correct between parts of a compound word. Word processors such as Microsoft Word and Google Docs replace " - " typed between spaces with an en dash automatically; if you need a real dash elsewhere, copy it from the dashes set. On a phone the hyphen sits on the first symbols page (123 on iPhone, ?123 on Android).
How to Type
- Windows
- - key (right of 0) · numpad - · Alt+45
- macOS
- - key (right of 0)
- Linux
- - key · Ctrl+Shift+U 2d
- HTML
- -
In Programming
In code this is the only minus that works: subtraction and negation (a - b, -x), decrement (i--), command-line options (-v, --help), kebab-case names in CSS classes and URLs, and ranges inside regex character classes ([a-z]). A typographic minus (U+2212) or a dash pasted from a word processor looks almost identical but is a syntax error in source code and an unrecognised flag in a terminal.
Tags
hyphen
minus
dash key
hyphen vs dash
alt 45
keyboard symbol
ascii
compound words
punctuation
command line flags