| Symbol Name | Horizontal Bar |
| Unicode Version | 1.1 |
| Unicode | U+2015 |
| Unicode block | |
| General category | Dash Punctuation (Pd) |
| CSS Code | \2015 |
| Hex Code | 0x2015 |
| HTML Code | ― |
| LaTeX | \text{HORIZONTALBAR} |
| Symbol | ― |
| URL encode (UTF-8 percent) | %E2%80%95 |
| Spoken / screen reader name | Horizontal Bar |
| UTF-8 | E2 80 95 |
| UTF-16 | 2015 |
| UTF-32 | 00002015 |
1\documentclass{article}2\usepackage{pifont}3\text{HORIZONTALBAR}4\end{document}You can type the horizontal bar symbol on most modern devices with the help of following methods:
Alt + 8213 on Windows (numeric keypad with Num Lock), or insert via Character Map.
Edit → Emoji & Symbols, search "horizontal bar", or use Unicode Hex Input with 2015.
Ctrl + Shift + U, type 2015, then Enter (layout-dependent).
Paste from this page, use text replacement, or pick from the symbol keyboard.
Paste from this page or use a keyboard with geometric symbol support.
1span.horizontal-bar::before { content: "\2015"; }1<span>―</span>Horizontal Bar symbol's representation in different programming languages can be found in the table below:
| Language | Representation |
|---|---|
| JavaScript / TypeScript | '\u2015' or String.fromCodePoint(8213) |
| Python | '\N{HORIZONTAL BAR}' or chr(8213) |
| Rust | '\u{2015}' |
| C / C++ | UTF-8 source or wchar_t with U+2015 |
| Go | string(rune(0x2015)) |
| Ruby | "\u{2015}" |