An NBSP is Unicode U+00A0, written in HTML as or  ; unlike a normal space, it prevents a line break between the surrounding characters. Use it for pairs such as a number and unit or a currency value, but prefer CSS white-space when the rule belongs to layout rather than to the text itself.
NBSP Meaning: What is a Non-Breaking Space?
What is NBSP? Learn what means, when to use it in HTML or email templates, how it differs from regular spaces, and CSS alternatives. Step-by-step.
// The short answer
In this guide · 8 sections
You’ve probably seen the acronym NBSP floating around - it stands for Non-Breaking Space. Under the hood, it’s just a dedicated whitespace character (specifically Unicode U+00A0) that looks identical to a plain old spacebar press, but it comes with a superpower: it stops browsers from breaking a line at that exact spot. While a standard space signals that it’s totally fine to wrap text onto the next line when space runs out, an NBSP tells the browser to keep those two adjacent words or symbols stuck together no matter what.
In your HTML markup, you’ll usually see it written as the named entity or sometimes its numeric sibling  . In this walkthrough, we’ll dive into practical situations where you actually want to reach for it, how it behaves differently compared to a regular space, and the scenarios where dropping in a quick CSS rule is actually the cleaner move.
Why Do We Use Non-Breaking Spaces?
When you’re laying out text on the web, a normal space naturally gives the browser permission to wrap lines whenever a container gets cramped. Most of the time, that’s exactly what you want to happen. The trouble begins when you have specific pairings of words or numbers that look awkward, sloppy, or downright confusing if they end up split across two separate lines.
Here are a few classic examples where an automatic line break just looks clumsy:
A quantity alongside its unit: 10 km, $99.99, 3 GHz
A person’s first and last name: John Smith
Calendar dates: March 12
Common abbreviations and their partner words: Mr. Johnson, No. 5
Without an NBSP, responsive screens might awkwardly leave "10" stranded at the end of one line and shove "km" down to the next. Dropping in a non-breaking space guarantees they stick together as a cohesive unit.
How to Use NBSP in HTML
Whenever you’re writing HTML and spot a phrase that shouldn't break, you just drop right between the words:
HTML
The file size is 4.5 MB.
Contact us for details.You could technically write the numeric entity   too, since browsers parse both as the exact same character. That said, almost every developer sticks with because it’s way easier to read and immediately recognize when reviewing markup.
It’s also worth knowing about its wider cousins:   (an en-space, which is half an em wide) and   (an em-space, which takes up a full em). Both of these prevent line wrapping as well, but they physically push text further apart horizontally. Keep these reserved for intentional typographic flair rather than trying to hack your layout.
How to Type NBSP
If you aren't writing raw HTML, you don't need to manually type out the entity string - you can insert a genuine non-breaking space directly using built-in system shortcuts:
Windows: Hold
Altand type0160on your numeric keypadMac: Hit
Option+SpaceLinux (GTK apps): Press
Ctrl+Shift+U, type00A0, and tapEnter
These handy combinations work smoothly across most desktop text editors, graphic design software, and word processors. When you’re inside a code editor like VS Code, though, typing the actual entity is usually preferred so your teammates can clearly see your intention in git diffs.
NBSP vs Regular Space: Key Differences
Here is a quick side-by-side comparison to help keep their core differences straight:
| Property | Regular Space | Non-Breaking Space ( ) |
|---|---|---|
| Allows line break | Yes | No |
| Collapsed by HTML | Yes (consecutive spaces collapse into one) | No (every single renders out) |
| Screen reader behavior | Handled naturally as a word boundary | Typically treated as a space or ignored |
| Copy-paste behavior | Copies cleanly as standard whitespace | Can copy over as a special character (sometimes causes bugs) |
| Typical use | General day-to-day sentence flow | Locking specific word/symbol pairs together |
NBSP in CSS: When to Use white-space: nowrap Instead
If you only have a quick two-word pairing tucked inside a paragraph, an inline works like a charm. But the moment you find yourself wanting to prevent line breaks across an entire phrase, a button label, or a reusable component, reaching for CSS is vastly cleaner and more maintainable.
By the way, if you’re brushing up on how other core inline elements behave, the HTML img tag guide breaks down everything you need to know about src, alt, responsive srcset, and modern loading attributes.
The white-space: nowrap property simply tells the browser to keep everything inside that container on a single continuous line:
CSS
.no-wrap {
white-space: nowrap;
}HTML
<span class="no-wrap">10 km</span>CSS white-space: nowrap is the way to go when the behavior belongs to an entire visual element or when your copy comes from a dynamic database where you can't hand-tweak the text. Reserve for those specific, one-off moments inside your static copy where you just need to glue two words together.
Another handy style worth keeping in your back pocket is word-break: keep-all, which comes in especially handy when working with CJK (Chinese, Japanese, Korean) typography where standard word boundaries follow different rules.
NBSP in Email Templates
HTML email development is notorious for quirks across different rendering engines, and non-breaking spaces are no exception. Here are a few practical rules of thumb to save you headaches:
Use
for numbers, prices, and names, exactly like regular web pages. The vast majority of email clients handle this without issue.Resist the urge to string multiple
entities together for visual indentation. It renders inconsistently across platforms. Always use proper padding or margins on your table cells instead.Windows Outlook is notorious for ignoring modern CSS layout rules, so dropping in an
can sometimes be your safest fallback to keep vital phrases from breaking.Always preview your templates across major clients (such as Gmail, Apple Mail, and desktop Outlook). Testing suites like Litmus or Email on Acid are absolute lifesavers here.
Common Mistakes When Using NBSP
Daisy-chaining multiple tags to create spacing or margins. We’ve all seen markup like trying to nudge a paragraph over, but it’s brittle, clutters your code, and breaks semantic standards. Always rely on CSS padding-left or margin-left for visual distance.
Manually inserting non-breaking spaces across an entire CMS. If you’re managing a content-heavy blog or docs site with hundreds of measurement values, trying to spot-fix every single one by hand is exhausting. Set up an automated filter or a typography plugin (like WP Typography on WordPress) to handle it behind the scenes.
Accidentally pasting hidden non-breaking spaces into your codebase. When you copy draft copy straight out of tools like Microsoft Word or Google Docs, invisible non-breaking spaces frequently tag along. They can mess with formatting or cause strange linting bugs. Get into the habit of pasting via a plain-text editor or using "Paste and Match Style."
NBSP and Accessibility
Assistive technologies handle non-breaking spaces a bit differently depending on the specific screen reader in use. The good news is that modern screen readers (including NVDA, JAWS, and VoiceOver) generally recognize a standalone NBSP as a normal word boundary, meaning a standard pairing like 10 km won't cause accessibility issues for your visitors.
Problems arise, however, when you string multiple non-breaking spaces together to force visual spacing. Some screen readers will literally announce every single space out loud, creating a choppy, frustrating listening experience for visually impaired users. This is another major reason why CSS padding and margin are essential for spacing rather than repetitive entity codes.
When building accessible digital experiences, lean on semantic HTML and modern CSS for your layout and design, leaving to do what it was originally created for: quietly preventing an inconvenient line break in a single, intentional spot. It’s just one of many useful symbols for digital communication you can lean on when basic text alone needs a tiny nudge in the right direction.
Quick answers
Frequently asked questions
What is the difference between and a regular space in HTML?
A regular space allows the browser to break a line at that point. An NBSP prevents the line break, keeping the surrounding words on the same line. Additionally, HTML collapses multiple regular spaces into one, but each renders as a visible space character.
Can I use white-space: nowrap instead of ?
Yes, and for whole elements it is usually the better choice. white-space: nowrap applies to an entire element, while targets a single space within a sentence. Use CSS for components and NBSP for isolated pairs in prose.
Why does copy-pasted text sometimes include non-breaking spaces?
Word processors like Microsoft Word and Google Docs insert NBSP in certain situations, for example after abbreviations or before units. When you copy that text and paste it into a code editor or CMS, the hidden character comes along. Use Paste as plain text or run the text through a plain-text editor first to strip them out.
Is it bad practice to use multiple for indentation?
Yes. Multiple NBSP entities are not a reliable or maintainable way to add horizontal space. Use CSS padding-left or margin-left instead. Multiple NBSP can also cause accessibility issues with some screen readers.
Does NBSP affect SEO or how Google reads my page?
A single NBSP between words is treated by Google as a word separator, similar to a regular space. It does not hurt your rankings. Excessive NBSP characters used for spacing instead of CSS are a code quality issue but not a direct ranking factor.
Something wrong or out of date?
Tools change fast. Tell the editor what no longer works.