HTML Entity for Non-Breaking Hyphen (‑)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+2011

What You'll Learn

How to display the Non-Breaking Hyphen (‑) in HTML using hexadecimal, decimal, and CSS escape methods. This character is U+2011 (NON-BREAKING HYPHEN) in the General Punctuation block (U+2000–U+206F)—a visible hyphen that prevents a line break at that position.

Render it with ‑, ‑, or CSS escape \2011. There is no named HTML entity. Compare with Hyphen (‐, ‐) and soft hyphen ­ (U+00AD).

⚡ Quick Reference — Non-Breaking Hyphen

Unicode U+2011

General Punctuation

Hex Code ‑

Hexadecimal reference

HTML Code ‑

Decimal reference

Named Entity

Use numeric codes only

Reference Table
Name           Value
────────────   ──────────
Unicode        U+2011
Hex code       ‑
HTML code      ‑
Named entity   (none)
CSS code       \2011
Meaning        Non-breaking hyphen (no line break)
Related        U+2010 = hyphen (‐, ‐)
               U+00AD = soft hyphen (­)
               U+00A0 = nbsp ( )
1

Complete HTML Example

This example demonstrates the Non-Breaking Hyphen (‑) using hexadecimal code, decimal HTML code, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point::after{
   content: "\2011";
  }
 </style>
</head>
<body>
<p>Non-Breaking Hyphen using Hexadecimal: &#x2011;</p>
<p>Non-Breaking Hyphen using Decimal: &#8209;</p>
<p id="point">Non-Breaking Hyphen using CSS Entity: </p>
<p>Example: non&#x2011;breaking</p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Non-Breaking Hyphen (‑) is supported in all modern browsers; most fonts include General Punctuation (U+2011):

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the Non-Breaking Hyphen (‑) in typography and line-break contexts:

Compound word non‑breaking hyphen
Headline State‑of‑the‑Art Design
Large glyph
Hyphen family ‐ hyphen   ‑ nbhyp   &shy; soft
Numeric refs &#x2011; &#8209; \2011

🧠 How It Works

1

Hexadecimal Code

&#x2011; uses the Unicode hexadecimal value 2011 to display the Non-Breaking Hyphen. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

&#8209; uses the decimal Unicode value 8209 to display the same character.

HTML markup
3

CSS Entity

\2011 is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.

CSS stylesheet
=

Same visual result

All three methods produce: . Unicode U+2011 forbids line breaks at the hyphen. No named HTML entity—use numeric codes in markup.

Use Cases

The Non-Breaking Hyphen (‑) is commonly used in:

📰 Headlines

Keeping hyphenated words intact on one line in titles and banners.

📝 Technical writing

Product names, API terms, and compound technical phrases.

📖 Typography

Editorial content where hyphenation must not split awkwardly.

📱 UI labels

Navigation items and buttons with hyphenated labels.

📄 Legal & formal

Proper nouns and formal terms that must not break mid-word.

🌐 Localization

Multilingual sites with language-specific hyphenation rules.

💡 Best Practices

Do

  • Use &#x2011; or &#8209; when a hyphen must not start a new line
  • Pair with white-space: nowrap only when the entire phrase must stay together
  • Distinguish from &hyphen; (U+2010) and &shy; (U+00AD)
  • Serve pages with UTF-8 (<meta charset="utf-8">)
  • Test wrapping behavior in narrow viewports and mobile layouts

Don’t

  • Expect a named HTML entity for U+2011
  • Use padded Unicode notation like U+02011—the correct value is U+2011
  • Use \02011 in CSS—the correct escape is \2011
  • Replace every hyphen with ‑—only use where line breaks must be forbidden
  • Confuse ‑ with en dash (–) or em dash (—)

Key Takeaways

1

Two HTML numeric references plus CSS for U+2011

&#x2011; &#8209;
2

For CSS, use \2011 in the content property

3

Unicode U+2011 — NON-BREAKING HYPHEN

4

Prevents line breaks at the hyphen; always visible (unlike &shy;)

5

No named entity—use numeric codes or UTF-8 literal in source files

❓ Frequently Asked Questions

Use &#x2011; (hex), &#8209; (decimal), or \2011 in CSS content. There is no named entity. All methods render ‑.
U+2011 (NON-BREAKING HYPHEN). General Punctuation block (U+2000–U+206F). Hex 2011, decimal 8209.
In headlines, product names, technical terms, and hyphenated compounds where the hyphen and both parts must stay on the same line (e.g. non‑breaking, state‑of‑the‑art).
U+2011 (‑) is a visible hyphen that forbids a line break at that point. U+2010 (‐, &hyphen;) is a standard hyphen that may break. U+00AD (&shy;) is a soft hyphen that appears only when a line breaks there.
No. U+2011 has no named HTML entity. Use &#x2011; or &#8209;, or type ‑ directly in UTF-8-encoded source files.

Explore More HTML Entities!

Discover 1500+ HTML character references — punctuation, typography, and more.

All HTML Entities →

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