Horizontal bar (―) is the Unicode character at U+2015 in General Punctuation. Official name: HORIZONTAL BAR. It is a long dash used as a text separator or quotation dash — similar in length to an em dash, but a distinct character.
Remember
Character ―
Unicode U+2015
Named entity ―
Hex entity ―
Decimal ―
CSS escape \2015
Meaning long horizontal separator / quotation dash
Not the same — (—) · – (–) · ‐ (‐)
Prefer ― in HTML. Hex ―, decimal ―, or typing ― in UTF-8 also work. For common English sentence breaks, — is usually the better default.
Reference
Quick Reference
One table for every form you will actually use.
Form
Code
Where it goes
Named entity
―
HTML markup (preferred)
Hex entity
―
HTML markup
Decimal entity
―
HTML markup
Direct character
―
HTML text (UTF-8)
CSS escape
\2015
Stylesheet content
When to Use Which
Situation
Use
Long separator / quotation-dash style break
― plus nearby prose when needed
Sentence aside / abrupt pause (common English prose)
Built with Named: ―
Built with Hex: ―
Built with Decimal: ―
Built with CSS: ―
Typed: ―
Section: Chapter 1 ― Chapter 2
Em dash: —
How It Works
1. Named:― is the preferred HTML form for U+2015 → ―.
2. Hex / decimal:― and ― insert the same code point. Same visual as named.
3. CSS: use \2015 in content (not an HTML entity). #point::after appends ―.
4. Typed: paste ― in a UTF-8 document when you need this dash. Choose — instead when you want a standard English em-dash break.
Pitfalls & Tips
Common mistakes when working with horizontal bar.
Name
Prefer ―
HTML5 defines ― for U+2015. Prefer it over inventing names. Hex and decimal still work when needed.
—
Not the em dash
— is — (U+2014). Horizontal bar is ―. Related long dashes — different code points and typical editorial use.
–
Not the en dash
– is – (U+2013). Use it for ranges (2010–2020). Horizontal bar is longer and meant for separators.
-
Not a hyphen or minus
ASCII - and ‐ (‐) are hyphen forms. − is the math minus. Do not swap them for ―.
Font
Font coverage
Some fonts render ― similarly to —. If you need a clear distinction, check the font’s General Punctuation coverage.
CSS vs HTML
Do not mix escapes
\2015 belongs in CSS strings. ― / ― / ― belong in HTML.
Semicolon
End references
Always finish entities with ; — write ―, not &horbar.
Compatibility
Browser Support
Horizontal bar (U+2015) and its entity forms (―, ―, ―, CSS \\2015) are supported in all mainstream browsers. Visible glyphs depend on General Punctuation font coverage.
✓ Universal support
Horizontal Bar (―)
Encode with named, hex, decimal, CSS escape, or type the character — same code point everywhere encoding is supported.
100%Browser coverage
Google ChromeSupported
Yes
Microsoft EdgeSupported
Yes
Mozilla FirefoxSupported
Yes
Apple SafariSupported
Yes
OperaSupported
Yes
Internet ExplorerAll versions
Yes
U+2015Full support
Bottom line: Prefer ― in HTML. Use ― / ― when numeric form is required, and \\2015 only inside CSS content.
Remember
Key Takeaways
Unicode: horizontal bar is U+2015 (decimal 8213) — glyph ―.
HTML: prefer ― — also ― / ― / type ―.
CSS: use \2015 inside content for generated text.
Meaning: ― ≠ — / – / hyphen — use for long separators.
Use ― (named), ― (hex), ― (decimal), type ― directly in UTF-8, or the CSS escape \2015 in content. Prefer ― in normal HTML.
U+2015 (HORIZONTAL BAR). Hex 2015, decimal 8213. It belongs to the General Punctuation block (U+2000–U+206F).
Yes. Use ― — the preferred form in HTML markup. Numeric forms ― and ― also work.
Use it for a long horizontal separator or quotation-dash style break. For sentence asides in English prose, — is more common. For ranges, prefer –. For compound words, prefer a hyphen.
HTML entities (―, ―, or ―) go in markup. The CSS escape \2015 goes in stylesheet strings (usually content on ::before/::after).
No. Horizontal bar is U+2015 (― / ―). Em dash is U+2014 (— / —). En dash is U+2013 (– / –). Hyphen is U+2010 (‐ / ‐) or ASCII -. Related dashes — different lengths and typical uses.
🤔
Did you know?
Horizontal bar is Unicode U+2015 (decimal 8213) — glyph ― in General Punctuation (official name HORIZONTAL BAR). HTML5 names it ―. Prefer ― in markup. It is often used as a quotation dash or long separator and is not the em dash — (—), en dash – (–), or hyphen ‐ (‐).