Horizontal bar
―
- Unicode
- U+2015
- HTML
- ―
How to type ―
Windows
- In Word and Outlook, type 2015 and then press Alt + X. The code turns into ―.
- On Windows 10 and 11, press the Windows key and the full stop key together to open the emoji panel, then switch to its symbols tab.
- There is no Alt code for the horizontal bar on a standard keyboard, so copying it from this page is usually quickest.
Mac
- Press Control + Command + Space to open the Character Viewer, search for "horizontal bar", and double-click the result.
iPhone and Android
- The horizontal bar is not on the standard iPhone or Android keyboard. Copy it from this page and paste it where you need it.
- If you use it often, save it as a text shortcut. On iPhone: Settings, General, Keyboard, Text Replacement. In Gboard: Settings, Dictionary, Personal dictionary.
Linux and Chromebook
- Press Ctrl + Shift + U, type 2015, then press Enter. This works in most Linux desktop apps and on Chromebooks.
Codes for ―
| Unicode | U+2015 |
|---|---|
| HTML name | ― |
| HTML decimal | ― |
| HTML hex | ― |
| CSS | \2015 (for the content property) |
| JavaScript | \u2015 |
| URL encoding | %E2%80%95 |
| UTF-8 bytes | E2 80 95 |
Unicode details
The official Unicode name of this character is Horizontal bar. Its code point is U+2015 (decimal 8213) and it belongs to the General Punctuation block.