HTML Entity for Non-Breaking Space

Beginner
6 min read
Updated: Sep 2026
1 example
Unicode U+00A0

What Is the Non-Breaking Space Entity?

Non-breaking space is the Latin-1 character at Unicode U+00A0 (NO-BREAK SPACE). It looks like a normal space but prevents a line break between the words or units it joins. HTML5 provides the named entity   (also  ).

Remember
Character     (invisible space)
Unicode       U+00A0
Named entity     (also  )
Hex entity     
Decimal        
CSS escape    \00A0

All of these insert the same character. Prefer   for readable HTML source.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Named entity HTML markup (also  )
Hex entity HTML markup
Decimal entity HTML markup
Direct characterU+00A0 in UTF-8HTML text (hard to see in editors)
CSS escape\00A0Stylesheet content

When to Use Which

SituationUse
Keep number + unit together10 kg
Readable HTML source 
Normal wrapping spaceType a regular space (U+0020)
Non-breaking hyphen‑ — see Related Topics
Generated text via ::before / ::aftercontent: "\00A0"

Live Preview

Non-breaking space is invisible — shown here joining text that should stay together.

Between words Hello World
Number + unit 10 kg
Named entity   → space
Numeric forms Hex   | Decimal  
Related normal space · ‑ (nb hyphen) · ­

Complete HTML Example

One page that shows the non-breaking space with named, hex, decimal, and CSS forms. Use View Output or open the live editor.

Named + Hex + Decimal + CSS

Four ways to insert U+00A0 so “Hello World” and “10 kg” stay together.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Non-Breaking Space in HTML</title>
  <style>
    #point::after {
      content: "\00A0World";
    }
  </style>
</head>
<body>
  <p>Using Named Entity: Hello&nbsp;World</p>
  <p>Using Hex Code: Hello&#xA0;World</p>
  <p>Using HTML Code: Hello&#160;World</p>
  <p>Using CSS Entity: Hello<span id="point"></span></p>
  <p>Example: 10&nbsp;kg</p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &nbsp; is the clearest HTML form for U+00A0.

2. Hex: U+00A0 → &#xA0; (or &#x00A0;) in HTML.

3. Decimal: same code point as 160 → &#160;. Same character.

4. CSS: use \00A0 in content (not an HTML entity). Here #point::after appends a no-break space plus World.

Pitfalls & Tips

Common mistakes when working with non-breaking spaces.

Layout

Do not fake indentation

Stacking &nbsp; for margins or columns is brittle. Use CSS (margin, padding, gap) instead.

Not a hyphen

Space vs ‑

&nbsp; joins with a space. Non-breaking hyphen (U+2011) joins with a hyphen. Pick the right character.

CSS vs HTML

Do not mix escapes

\00A0 belongs in CSS. &nbsp; / &#xA0; / &#160; belong in HTML.

Collapsing

Normal spaces collapse

HTML collapses regular spaces; &nbsp; does not collapse the same way and can create stubborn gaps if overused.

Semicolon

End references

Always finish with ; — write &nbsp;, not &nbsp.

Editors

Hard to see when pasted

A pasted U+00A0 looks like a normal space. Prefer &nbsp; in source so the intent stays visible.

Browser Support

Non-breaking space (U+00A0) and its entity forms (&nbsp;, &#xA0;, &#160;, CSS \\00A0) are supported in all mainstream browsers.

✓ Universal support

Non-Breaking Space (&amp;nbsp;)

Prefer &nbsp;, or encode with hex, decimal, or CSS escape — same character everywhere.

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+00A0 / entities Full support

Bottom line: Prefer &nbsp; in HTML. Use &#xA0; / &#160; when a numeric form is required, and \\00A0 only inside CSS content.

Key Takeaways

  • Unicode: no-break space is U+00A0 (decimal 160), Latin-1 Supplement.
  • HTML: prefer &nbsp; (alias &NonBreakingSpace;), or &#xA0; / &#160;.
  • CSS: use \00A0 inside content for generated text.
  • Use: keep related words/units together — not for layout padding.

One line: U+00A0 → &nbsp; / &#xA0; / &#160; / CSS \00A0.

Frequently Asked Questions

Use &nbsp; (named), &#xA0; or &#x00A0; (hex), &#160; (decimal), or the CSS escape \00A0 in content. All insert U+00A0. Prefer &nbsp; for readable HTML.
U+00A0 (NO-BREAK SPACE). Hex A0 / 00A0, decimal 160. It belongs to the Latin-1 Supplement and prevents a line break at that space.
Yes. HTML5 defines &nbsp; and &NonBreakingSpace; for U+00A0. You can also use &#160; or &#xA0;.
Use it to keep related pieces on one line — number and unit (10 kg), title and name, or short phrases that should not wrap awkwardly. Do not use &nbsp; for layout or indentation; use CSS instead.
HTML entities (&nbsp;, &#160;, or &#xA0;) go in markup. The CSS escape \00A0 is used in stylesheets (usually in the content property of ::before/::after). Both insert a no-break space.
A normal space (U+0020) may allow a line break. A non-breaking hyphen (U+2011) keeps a hyphenated join together. &nbsp; keeps a space join together. Different characters for different jobs.

Did you know?

Non-breaking space (U+00A0, decimal 160) is NO-BREAK SPACE in Latin-1 Supplement. HTML5 provides &nbsp; (also &NonBreakingSpace;). It looks like a normal space but prevents a line break between the words or units it joins — classic uses include 10&nbsp;kg and keeping a name together.

Next: NOR

Learn the HTML entity for the NOR logic symbol — the next character in this entity sequence.

NOR 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