Hyphen HTML entity ‐

‐ is the HTML entity for Hyphen ‐ (U+2010). Copy the decimal ‐ and hex ‐ codes plus CSS, JavaScript, Python and URL escapes.

Entity
‐
Also written
‐
Code point
U+2010
Unicode name
HYPHEN
Block
General Punctuation
Category
Dash punctuation (Pd)
Since
Unicode 1.1
Defined in
HTML5

Codes to copy

HTML named‐Works in HTML; in XML only & < > " ' are predefined.
HTML decimal‐Works in HTML and XML.
HTML hex‐Works in HTML and XML.
CSScontent: "\2010";In a stylesheet, for ::before and ::after.
JavaScript"\u2010"Also valid in JSON.
Python"\u2010"Python 3 string literal.
Python by name"\N{HYPHEN}"Readable alternative using the Unicode name.
URL%E2%80%90Percent-encoded UTF-8 bytes, for a path or query value.
UTF-8 bytesE2 80 903 bytes.
UTF-1620101 code unit, which is what JavaScript length counts.

When to use it

The unambiguous hyphen (U+2010). Most text uses the keyboard hyphen-minus, which serves as both hyphen and minus; this one only ever means hyphen. Not every font includes it, so test before using it widely. ‐ is an alias, despite the name.

The name comes from the HTML5 list (much of it shared with MathML), so it works in every current browser but not in XML or XHTML served as XML, where the numeric reference is the safe choice.

More punctuation and typography

All punctuation and typography · Every HTML entity · Encode or decode text

Source: the WHATWG HTML Standard list of named character references and the Unicode Character Database (Unicode 18.0).