A non-breaking space is a space that looks like a normal space but prevents a line break at that position. In HTML you usually write it as (named entity for Unicode U+00A0, NO-BREAK SPACE).
Why does it matter on an HTML page?
Narrow columns and mobile screens wrap text wherever a normal space allows. Without glue, you can get awkward splits like Mr. on one line and Smith on the next, or 10 alone and kg below it.
How is it different from a regular space?
A regular space (U+0020) may collapse (several spaces become one) and allows wrapping. A non-breaking space does not collapse like ordinary HTML whitespace and blocks wrapping at that spot.
When should you use it?
Only where wrapping would hurt meaning or readability—not for indenting or pushing layout. Prefer CSS for spacing and alignment.
Think “glue.”
Mr. Smith and 10 kg keep related tokens on one line.
Not a layout tool.
Do not chain to indent. Use CSS margin, padding, or gap.
One line: Replace a normal space with only where a line break would look wrong.
Frequently Asked Questions
is the named character reference for a non-breaking space (Unicode U+00A0). The browser shows a normal-looking space that will not allow a line break at that position.
Use it to keep related tokens together: titles with names (Mr. Smith), numbers with units (10 kg), phone digit groups, dates, or short labels that look wrong when wrapped.
A regular space (U+0020) can collapse in HTML and allows wrapping. A non-breaking space (U+00A0) does not collapse like ordinary whitespace and prevents wrapping at that spot.
Yes. All three insert U+00A0. Prefer in tutorials and everyday markup; use numeric forms when you need them.
No. Do not chain characters to indent or push content. Use CSS margin, padding, gap, or flex/grid instead.
This tutorial focuses on when and how to use non-breaking spaces in HTML pages. The entity page lists encodings (named, hex, decimal, CSS) for U+00A0 in detail.