Decimal Notation in HTML


Rotate Your Device!

This content is too wide to fit your screen.
Rotate the device to landscape view.

The hyphen you can insert with the key next to the zero on your keyboard is an ambiguous character suffering from an identity crisis.
It can't decide if it's a hyphen -, a minus −, an em dash — or an en dash –.

The Unicode specification describes the key as a hyphen-minus and defines very specific replacements for its use.

Use it to insert a hyphen, but never for a minus or a dash, since it does not have the correct width for either, or the vertical position for the latter.

Neither an em dash nor an en dash should be confused with the hyphen, which has the following functions:

  1. To join compound words together.
  2. To connect compound words
  3. To connect the syllables of words broken at the ends of lines
  4. To connect prefixes and suffixes to words

The modern trend is away from hyphenation, and to eliminate the hyphen after a prefix.

Hyphens are always required with the following prefixes:

  • half
  • quarter
  • quasi
  • self
  • ex
  • all

Permanent compounds tend to become solid, and temporary compounds tend to be hyphenated only when necessary to avoid ambiguity.

Hyphens in Decimal Notation
Character Notes Code Render
hyphen punctuation - -
minus mathematical −
hyphen character punctuation ‐
non-breaking does what its name implies ‑
soft hyphen indicates where a word may be broken at the end of a line ­ a­b
hyphen point punctuation ‧
hyphen bullet punctuation ⁃
z1 double oblique punctuation ⸗
z1 with diaeresis punctuation ⸚

Some typographers prefer to use an en dash surrounded by full spaces.

full space + en dash + full space


Others prefer to insert hair spaces on either side of the em dash.

hair space + em dash + hair space


Others prefer to insert hair spaces on either side of the en dash.

hair space + en dash + hair space