HTML Entity for Hyphen (‐)

Beginner
5 min read
Updated: Sep 2026
1 example
Unicode U+2010

What Is Hyphen?

Hyphen (‐) is the Unicode character at U+2010 in General Punctuation. Official name: HYPHEN. Use it to join compound words and mark line-break hyphenation when you want the dedicated Unicode hyphen.

Remember
Character     ‐
Unicode       U+2010
Named entity  ‐  (alias ‐)
Hex entity    ‐
Decimal       ‐
CSS escape    \2010
Meaning       Unicode hyphen (compounds / hyphenation)
Not the same  - (U+002D) · – (–) · — (—)

Prefer ‐ (or ‐), ‐, or ‐ in HTML. You can also type ‐ in a UTF-8 document. The key next to 0 on most keyboards inserts hyphen-minus (-, U+002D).

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Named entity‐ / ‐HTML markup (preferred)
Hex entity‐HTML markup
Decimal entity‐HTML markup
Direct character‐HTML text (UTF-8)
CSS escape\2010Stylesheet content
Keyboard hyphen-minus- (U+002D)Everyday typing (different code point)

When to Use Which

SituationUse
Compound word / Unicode hyphen‐ → well‐known
Everyday keyboard typingHyphen-minus - (U+002D) — fine for most plain text
Non-breaking hyphen (keep on one line)Non-breaking hyphen — U+2011
Ranges / “to” (e.g. 10–20)En dash — – (–)
Break / interruption in a sentenceEm dash — — (—)
Hyphen-looking list bulletHyphen bullet — ⁃
Generated text via ::before / ::aftercontent: "\2010"

Live Preview

Glyph alone, in a compound word, and next to related dashes.

Glyph ‐
Large glyph ‐
Sample well‐known
Compared ‐   -   –   —
With entities Named: ‐ | Hex: ‐ | Decimal: ‐

Complete HTML Example

One page that shows hyphen with named, hex, decimal, CSS escape, a typed character, and comparisons. Use View Output or open the live editor.

Named + Hex + Decimal + CSS + Compared

Ways to display ‐ in HTML and CSS, next to hyphen-minus and dashes.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Hyphen (U+2010) in HTML</title>
  <style>
    #point::after {
      content: "\2010";
    }
  </style>
</head>
<body>
  <p>Built with Named: &hyphen;</p>
  <p>Alias Named: &dash;</p>
  <p>Built with Hex: &#x2010;</p>
  <p>Built with Decimal: &#8208;</p>
  <p id="point">Built with CSS: </p>
  <p>Typed: ‐</p>
  <p>Sample: well&hyphen;known</p>
  <p>Hyphen-minus (U+002D): -</p>
  <p>En dash: &ndash; · Em dash: &mdash;</p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &hyphen; and &dash; both insert U+2010 → ‐.

2. Hex / decimal: &#x2010; and &#8208; are the same code point. Same visual as named.

3. CSS: use \2010 in content (not an HTML entity). #point::after appends ‐.

4. Compared: keyboard - is U+002D. &ndash; and &mdash; are longer dashes for ranges and breaks — not compound-word hyphens.

Pitfalls & Tips

Common mistakes when working with hyphen.

Keys

Hyphen vs hyphen-minus

U+2010 (‐) is the Unicode hyphen. The keyboard character is usually U+002D (-). They look similar but are different code points.

Name

Two named entities

Both &hyphen; and &dash; mean U+2010. Prefer &hyphen; for readability; &dash; is a valid alias.

Dashes

Not an en/em dash

Use &ndash; for ranges and &mdash; for sentence breaks. Do not use a hyphen where a dash is required by style guides.

Wrap

Need a non-breaking hyphen?

If the hyphen must stay on the same line as both parts, use non-breaking hyphen (U+2011), not U+2010.

CSS vs HTML

Do not mix escapes

\2010 belongs in CSS strings. &hyphen; / &#x2010; / &#8208; belong in HTML.

a11y

Compounds stay readable

Hyphens in words are usually fine for screen readers. Prefer clear compound wording; avoid stuffing punctuation that changes meaning.

Semicolon

End references

Always finish entities with ; — write &hyphen;, not &hyphen.

Browser Support

Hyphen (U+2010) and its entity forms (&hyphen;, &dash;, &#x2010;, &#8208;, CSS \\2010) are supported in all mainstream browsers. Visible glyphs depend on General Punctuation font coverage.

✓ Universal support

Hyphen (&#x2010;)

Encode with named, hex, decimal, CSS escape, or type the character — same code point everywhere encoding is supported.

100% Browser coverage
Google Chrome Supported
Yes
Microsoft Edge Supported
Yes
Mozilla Firefox Supported
Yes
Apple Safari Supported
Yes
Opera Supported
Yes
Internet Explorer All versions
Yes
U+2010 Full support

Bottom line: Prefer &hyphen; (or &dash;) in HTML. Use &#x2010; / &#8208; when numeric form is required, and \\2010 only inside CSS content.

Key Takeaways

  • Unicode: hyphen is U+2010 (decimal 8208) — glyph ‐.
  • HTML: &hyphen; / &dash; / &#x2010; / &#8208; / type ‐.
  • CSS: use \2010 inside content for generated text.
  • Meaning: ‐ ≠ - / &ndash; / &mdash; — Unicode hyphen for compounds.

One line: U+2010 → &hyphen; / &#x2010; / &#8208; / CSS \2010.

Frequently Asked Questions

Use &hyphen; or &dash; (named), &#x2010; (hex), &#8208; (decimal), type ‐ directly in UTF-8, or the CSS escape \2010 in content.
U+2010 (HYPHEN). Hex 2010, decimal 8208. It belongs to the General Punctuation block (U+2000–U+206F).
Yes for the glyph: both named entities decode to U+2010. Prefer &hyphen; when you want the clearer name; &dash; is an alias for the same character.
Use it for compound words and typographic hyphenation when you want the Unicode hyphen specifically. Everyday keyboard typing usually inserts hyphen-minus (U+002D), which is fine for most plain text.
HTML entities (&hyphen;, &#8208;, or &#x2010;) go in markup. The CSS escape \2010 goes in stylesheet strings (usually content on ::before/::after).
No. Hyphen (U+2010) and hyphen-minus (U+002D) are short connectors. &ndash; (U+2013) is an en dash; &mdash; (U+2014) is an em dash. Related punctuation — different characters and uses.

Did you know?

Hyphen is Unicode U+2010 (decimal 8208) — glyph ‐ in General Punctuation (official name HYPHEN). HTML5 named entities: &hyphen; and &dash; (same character). Prefer it for compound words and explicit hyphenation. The keyboard key is usually hyphen-minus (U+002D, -), which is a different code point.

Next: Hyphen Bullet

Learn the HTML entity for Hyphen Bullet (U+2043).

Hyphen Bullet tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful