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

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode 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

Unicode U+00A0

Latin-1 Supplement

Hex Code  

Hexadecimal reference

HTML Code  

Decimal reference

Named Entity  

Most common in HTML markup

Reference Table
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 space
1

Complete 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:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point::after{
   content: "\00A0World";
  }
 </style>
</head>
<body>
<p>Hex: Hello&#x00A0;World</p>
<p>Decimal: Hello&#160;World</p>
<p>Named: Hello&nbsp;World</p>
<p>CSS: Hello<span id="point"></span></p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Non-Breaking Space (U+00A0) is universally supported in all browsers and has been part of HTML since the earliest versions:

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

👀 Live Preview

See the Non-Breaking Space in typical typography contexts (invisible, but prevents wrapping):

Number + unit 10 kg
Title + name Dr. Smith
Currency $ 99.00
Entity refs &nbsp; &#x00A0; &#160; \00A0
Visual marker Hello[ ]World (brackets show nbsp position)

🧠 How It Works

1

Named Entity

&nbsp; is the standard HTML named entity for U+00A0—the most familiar and widely used option in markup.

HTML markup
2

Hexadecimal Code

&#x00A0; uses the Unicode hexadecimal value 00A0. The x prefix indicates hexadecimal format.

HTML markup
3

Decimal HTML Code

&#160; uses the decimal Unicode value 160 to insert the same non-breaking space.

HTML markup
4

CSS Entity

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

CSS stylesheet
=

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 (&nbsp;) is commonly used in:

🔢 Numbers & units

Keep values and units together: 10 kg, 5 km, 100 %.

📝 Titles & names

Prevent awkward breaks in Dr. Smith, Mr. Jones, etc.

💰 Currency & prices

Keep currency symbols with amounts: $ 99, € 50.

📰 Headlines

Control wrapping in short phrases that should stay on one line.

📄 Tables & layout

Legacy spacing in table cells when CSS is limited (prefer CSS today).

📖 Typography

Fine-grained control over line breaks in editorial content.

💡 Best Practices

Do

  • Use &nbsp; to keep related tokens on the same line
  • Prefer CSS white-space: nowrap on 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 &nbsp; for layout spacing—use CSS margin/padding instead
  • Use padded Unicode notation like U+000A0—the correct value is U+00A0
  • Use \000A0 in 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

1

Three HTML references plus CSS all insert a non-breaking space

&nbsp; &#x00A0; &#160;
2

For CSS, use \00A0 in the content property

3

Unicode U+00A0 — NO-BREAK SPACE

4

Prevents line breaks; does not collapse like a regular space

5

&nbsp; is the preferred named entity for readable markup

❓ Frequently Asked Questions

Use &nbsp; (named), &#x00A0; (hex), &#160; (decimal), or \00A0 in CSS content. All produce U+00A0.
U+00A0 (NO-BREAK SPACE). Latin-1 Supplement. Hex 00A0, decimal 160. Named entity: &nbsp;.
To keep words or tokens together on one line—e.g. numbers and units (10 kg), titles and names (Dr. Smith), or phrases that must not wrap awkwardly.
&nbsp; (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.
Yes. &nbsp; 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.

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