Windows
Hold Alt and type 0151 on the numeric keypad.
Punctuation
Copy the character, or use the shortcut that matches your keyboard and app.
Hold Alt and type 0151 on the numeric keypad.
Option + Shift + Hyphen
Ctrl + Alt + Minus (numeric) or 2014 then Alt + X
Insert → Special characters → em dash
Click the keycap, then paste with Ctrl+V or Cmd+V.
Num Lock on, hold Alt, type 0151, release Alt.
Use the Unicode, HTML, CSS, or JS value below in documents and stylesheets.
U+2014——\2014\u{2014}Alt + 0151