Search
Search for a symbol or emoji...
―
―
Horizontal Bar Symbol ―
Horizontal Bar Symbol Information
| Symbol Name | Horizontal Bar |
| Unicode Version | 1.1 (June 1993) |
| Unicode | U+2015 |
| CSS Code | \2015 |
| HTML Entity | ― |
| Hex Code | ― |
| HTML Code | ― |
| Latex | \rule{1em}{1pt} |
| Symbol | ― |
Horizontal Bar Symbol Encoding
| UTF-8 | 0xE2 0x80 0x95 |
| UTF-16 | 0x2015 |
| UTF-32 | 0x00002015 |
Horizontal Bar Symbol in Latex
Horizontal Bar
1\documentclass{article}
2\begin{document}
3\rule{1em}{1pt}
4\end{document}How to add horizontal bar symbol via keyboard on different Operating systems
You can type the horizontal bar symbol on most modern devices with the help of following methods:
How to type horizontal bar symbol on Microsoft Word
You can type the horizontal bar in Microsoft Word using steps mentioned below:
- Place your cursor in the text area where you need to insert the symbol and type 2015
- Without moving the cursor press keys Alt + x together
- The original 2015 is now transformed into ―
How to type horizontal bar symbol on Microsoft Windows
You can type the horizontal bar on Microsoft windows using following steps:
- Hold Alt and press to type horizontal bar on your windows machine.
How to type horizontal bar symbol on Mac OS
You can type the horizontal bar on Mac OS using following steps:
- Place your cursor in the text area where you need to insert the symbol
- Press Ctrl + ⌘ Command + ⎵ Space to bring up the Character Viewer. Alternatively, choose Edit ⇒ Emoji & Symbols
- Type "Horizontal Bar" in the search field at the top and press Enter
- The symbol should appear. Click on it to insert it into your text


How to type horizontal bar symbol on Linux
You can type the horizontal bar on Linux using following steps:
- Place your cursor in the text area where you need to insert the symbol
- Hold ⇧ Shift + Ctrl and press the letter + U
- Press keys 2015 consecutively
- And then press ↵ Enter , the desired symbol will be added to your document
How to type horizontal bar symbol on IOS and Android
The easiest way to type the horizontal bar symbol on ios and android is to copy and paste it wherever you need it.
How to use horizontal bar in CSS
//CSS Example
1span {
2 content: \2015;
3 }How to use horizontal bar in HTML
//HTML Example
1<span>―</span>Horizontal Bar symbol representation in programming languages
Horizontal Barsymbol's representation in different programming languages can be found in table below:
| Language | Representation |
|---|---|
| Rust | \u{2015} |
| Ruby | \u{2015} |
| Python | \u2015 |
| PHP | \u{2015} |
| Perl | \x{2015} |
| Java | \u2015 |
| Modern JavaScript - Since ES6 | \u{2015} |
| JavaScript | \u2015 |
| Go | \u2015 |
| C# | \u2015 |
| C and C++ | \u2015 |
| Bash and Zsh - inside echo -e | \u2015 |
| RFC 5137 | \u'2015' |
