Last copied
nothing yet. copy anything below.

How to type Horizontal Bar

To type Horizontal Bar (―), press Alt + 8213 on Windows, holding Alt while typing the digits on the numeric keypad, or write ― in HTML. On any system you can copy it from this page, or enter its codepoint U+2015 directly: Ctrl+Shift+U then 2015 on Linux, or 2015 then Alt+X in Microsoft Word.

Horizontal Bar

―
Copy it
Unicode
U+2015
Windows
Alt + 8213 needs regedit
Ways to type Horizontal Bar
WhereShortcutHow
WindowsAlt + 8213Above 255, so Windows will not accept it as typed. Copy the character instead.
MacN/APress the keys together.
HTML―Paste this into HTML source.
UnicodeU+2015HORIZONTAL BAR

Symbols related to Horizontal Bar

Unicode's confusables table, the one registrars use against spoofed domains, lists — as close enough to be mistaken for it, and the rest are filed under dash in CLDR, the keyword list Unicode publishes alongside the names.

Other punctuation symbols

All punctuation alt codes

― lives in the General Punctuation block (U+2000-U+206F), dashes, quotation marks, spaces and reference marks used across languages. Within Unicode it is classified as Pd, a dash. Every hyphen and dash variant shares this category.

What Horizontal Bar is used for

In mathematical notation ― is an ordinary symbol: it carries no special spacing and sits in an expression the way a letter does, standing for a thing rather than doing something to the things around it. That is the classification unicode-math gives it, and it is what decides how the symbol is set: $\horizbar$ in LaTeX, in maths mode rather than in a sentence.

Unicode publishes a second list of names for ― in CLDR, the keywords its own search data offers rather than the formal name, and they are dash and line. Those words are what somebody looking for this character is liable to type when Horizontal Bar is not the name they know it by, and the search on the symbol lists matches them as well as the Unicode name.

What ― gets confused with

Unicode's own confusables table, the one used to catch lookalike domain names, groups ― with — (U+2014, Em Dash) and ─ (U+2500, Box Drawings Light Horizontal). They are separate characters that render close enough to be mistaken for one another, so a search or a string comparison will separate them where your eye will not. If Horizontal Bar is not matching where you expect it to, one of these is the usual reason.

What Unicode says about Horizontal Bar

The standard recognises ― under another name as well: quotation dash. That is a formal alias, not a nickname, which is why it turns up in other people's documentation for the same codepoint.

Unicode annotates ― directly. Against U+2015 the code chart carries the note “Long dash introducing quoted text”. That is the standard saying what the character is for, rather than an inference from its name.

How Horizontal Bar behaves in software

― is East Asian Ambiguous: one column in a Western locale and two in a CJK one. That is why a table that lines up on your machine can break on somebody else's, with no change to the text at all. It carries no direction of its own, so in a line that mixes English with Arabic or Hebrew it takes the direction of the text around it rather than forcing one.

What people ask about Horizontal Bar

What does a horizontal 8 mean?

― is HORIZONTAL BAR, encoded at U+2015. The Unicode code chart annotates it “Long dash introducing quoted text”, which is the standard's own statement of what it is for.

Every way to write Horizontal Bar

Encodings and escapes for Horizontal Bar (―)
FormValue
CodepointU+2015
Decimal8213
UTF-8 bytesE2 80 95
UTF-16 bytes20 15
HTML entity―
HTML numeric― or ―
CSS\2015
JavaScript\u2015
Python\u2015
URL-encoded%E2%80%95
LaTeX, in maths mode$\horizbar$
SVG2015.svg · (SIL Open Font License)

If ― arrives as ―

Its three UTF-8 bytes E2 80 95 are being read one at a time as Windows-1252. The text is undamaged; the reader has to be told it is UTF-8.

Namepoint at any character
Unicode—
Windows—
Mac—
HTML—
COPIED