Horizontal bar

― is the Unicode character “HORIZONTAL BAR” (U+2015). It belongs to the General Punctuation block and was added in Unicode 1.1. Click it to copy, or use the codes below.

― codes

UnicodeCode point U+2015
HTML codeDecimal, works in any HTML page ―
HTML hexHexadecimal HTML code ―
CSSFor the CSS content property \2015
JavaScriptEscape in JavaScript strings \u2015
PythonEscape in Python strings \u2015
URL encodedPercent-encoded UTF-8 %E2%80%95
UTF-8Bytes in UTF-8 E2 80 95
UTF-16Code units in UTF-16 2015

How to type ―

Copy and paste

Click to copy it, then paste with Ctrl + V (⌘ + V on a Mac) or a long press on phones.

Windows

Press Win + . to open the emoji and symbol panel, then search for “horizontal bar”.

In Microsoft Word, type 2015 and press Alt + X.

Mac

Press Control + ⌘ + Space to open the Character Viewer, then search for “horizontal bar”.

iPhone and Android

Copy it here and paste it. To type it again later, save it as a text replacement (iPhone: Settings › General › Keyboard › Text Replacement; Gboard: Settings › Dictionary › Personal dictionary).

HTML and CSS

Unicode U+2015. Every format is on the horizontal bar page.

About ―

Unicode name
HORIZONTAL BAR
Code point
U+2015 (8213)
Block
General Punctuation
Category
Dash Punctuation
Unicode version
1.1