HTML Entity for Non-Breaking Space (U+00A0)

What You'll Learn
How to insert a Non-Breaking Space in HTML using the named entity, hexadecimal, decimal, and CSS escape methods. This character is U+00A0 (NO-BREAK SPACE)—it looks like a normal space but prevents a line break at that position and does not collapse in HTML.
Render it with ,  ,  , or CSS escape \00A0. It is one of the most commonly used HTML entities for typography and layout control.
⚡ Quick Reference — nbsp
U+00A0Latin-1 Supplement
 Hexadecimal reference
 Decimal reference
Most common in HTML markup
Name Value
──────────── ──────────
Unicode U+00A0
Hex code  
HTML code  
Named entity
CSS code \00A0
Meaning Non-breaking space (no line break)
Related U+0020 = regular space
U+2011 = non-breaking hyphen (‑)
U+2007 = figure spaceComplete HTML Example
This example demonstrates a Non-Breaking Space using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape. The space is invisible but keeps tokens together:
<!DOCTYPE html>
<html>
<head>
<style>
#point::after{
content: "\00A0World";
}
</style>
</head>
<body>
<p>Hex: Hello World</p>
<p>Decimal: Hello World</p>
<p>Named: Hello World</p>
<p>CSS: Hello<span id="point"></span></p>
</body>
</html>🌐 Browser Support
The Non-Breaking Space (U+00A0) is universally supported in all browsers and has been part of HTML since the earliest versions:
👀 Live Preview
See the Non-Breaking Space in typical typography contexts (invisible, but prevents wrapping):
🧠 How It Works
Named Entity
is the standard HTML named entity for U+00A0—the most familiar and widely used option in markup.
Hexadecimal Code
  uses the Unicode hexadecimal value 00A0. The x prefix indicates hexadecimal format.
Decimal HTML Code
  uses the decimal Unicode value 160 to insert the same non-breaking space.
CSS Entity
\00A0 is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.
Same visual result
All four methods produce an invisible non-breaking space. Unicode U+00A0 prevents line breaks at that position and does not collapse like U+0020.
Use Cases
The Non-Breaking Space ( ) is commonly used in:
Keep values and units together: 10 kg, 5 km, 100 %.
Prevent awkward breaks in Dr. Smith, Mr. Jones, etc.
Keep currency symbols with amounts: $ 99, € 50.
Control wrapping in short phrases that should stay on one line.
Legacy spacing in table cells when CSS is limited (prefer CSS today).
Fine-grained control over line breaks in editorial content.
💡 Best Practices
Do
- Use
to keep related tokens on the same line - Prefer CSS
white-space: nowrapon containers when appropriate - Use nbsp between numbers and units (10 kg) for typographic quality
- Serve pages with UTF-8 (
<meta charset="utf-8">) - Consider accessibility—excessive nbsp can confuse screen readers
Don’t
- Use multiple
for layout spacing—use CSS margin/padding instead - Use padded Unicode notation like U+000A0—the correct value is
U+00A0 - Use
\000A0in CSS—the correct escape is\00A0 - Replace all spaces with nbsp—only use where breaks must be prevented
- Confuse nbsp with Non-Breaking Hyphen (‑)
Key Takeaways
Three HTML references plus CSS all insert a non-breaking space
   For CSS, use \00A0 in the content property
Unicode U+00A0 — NO-BREAK SPACE
Prevents line breaks; does not collapse like a regular space
is the preferred named entity for readable markup
❓ Frequently Asked Questions
(named),   (hex),   (decimal), or \00A0 in CSS content. All produce U+00A0.U+00A0 (NO-BREAK SPACE). Latin-1 Supplement. Hex 00A0, decimal 160. Named entity: . (U+00A0) prevents a line break at that position and does not collapse in HTML. A regular space (U+0020) may allow wrapping and consecutive spaces collapse to one. is the standard named HTML entity for U+00A0 and is the most widely used option in markup.Explore More HTML Entities!
Discover 1500+ HTML character references — spaces, punctuation, symbols, and more.
8 people found this page helpful
