Horizontal Bar Symbol ―

Copy to Clipboard


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}

Horizontal Bar Symbol Encoding

UTF-8 0xE2 0x80 0x95
UTF-16 0x2015
UTF-32 0x00002015


Horizontal Bar symbol's PNG and SVG files


How to type horizontal bar symbol in latex

Copy \documentclass{article}
\begin{document}
\rule{1em}{1pt}
\end{document}

How to add horizontal bar symbol via keyboard on different Operating systems

You can type the horizontal bar 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 on microsoft Microsoft Word using steps mentioned below:

  • Place your cursor in the text area where you need to insert the symbol and type 2 0 1 5
  • Without moving the cursor press keys Alt + x together
  • The original 2 0 1 5 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 Mac OS
    How to type horizontal bar symbol on Mac OS

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 2 0 1 5 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 on ios and android is to copy and paste it wherever you need it.


How to use horizontal bar in CSS

Copy // css example
span {
content: "\2015";
}

How to type horizontal bar in HTML

Copy // html example
<span>&#8213;</span>

Horizontal Bar symbol representation in programming languages

horizontal bar'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'
No Result
Try something else