(invisible)
Punctuation

Non-Breaking Space  

The non-breaking space prevents an automatic line break at its position. It looks identical to a regular space but instructs the browser to keep the words on either side together on the same line. It is one of the most commonly used HTML entities, though it is often misused as a spacing tool when CSS margins or padding would be more appropriate.

All Representations

Named Entity
 
Decimal Code
 
Hex Code
 
Unicode
U+00A0

Rendered Output

[Non-Breaking Space]

  renders as the character shown above

When to Use Non-Breaking Space

Use the non-breaking space to keep related words together, such as a number and its unit (100 km), a title and a name (Mr. Smith), or a date and time. Avoid using multiple non-breaking spaces for visual layout — use CSS properties like margin, padding, or text-indent instead.

Try It — HTML Examples

Named entity in text
<p>Symbol: &nbsp;</p>
Decimal reference
<p>Symbol: &#160;</p>
Hex reference
<p>Symbol: &#xA0;</p>
Inside an HTML attribute
<div title="The Non-Breaking Space: &nbsp;">Hover to see</div>

About the Non-Breaking Space Entity

The Non-Breaking Space character (&nbsp;) is a standard HTML entity defined in the HTML specification. In HTML source code, it can be written using the named entity reference &nbsp;, the decimal numeric character reference &#160;, or the hexadecimal numeric reference &#xA0;. The character is assigned Unicode code point U+00A0 in the Universal Character Set.

The non-breaking space prevents an automatic line break at its position. It looks identical to a regular space but instructs the browser to keep the words on either side together on the same line. It is one of the most commonly used HTML entities, though it is often misused as a spacing tool when CSS margins or padding would be more appropriate.

Punctuation and whitespace entities are among the most frequently used HTML entities in web development. They handle characters that either have special meaning in HTML syntax — such as angle brackets and ampersands — or represent typographic characters that improve the visual quality of text, like em dashes and curly quotes. Proper use of punctuation entities is essential for producing valid, well-formed HTML documents and achieving professional-looking typography on the web.

When deciding how to encode the Non-Breaking Space character in your HTML documents, the named entity &nbsp; is generally the most readable choice for developers reviewing or maintaining source code. The decimal form &#160; and hexadecimal form &#xA0; are equally valid alternatives that work in contexts where named entities may not be supported, or when generating HTML output programmatically from server-side code. All three representations produce identical visual output in every modern web browser.

Use the non-breaking space to keep related words together, such as a number and its unit (100 km), a title and a name (Mr. Smith), or a date and time. Avoid using multiple non-breaking spaces for visual layout — use CSS properties like margin, padding, or text-indent instead.

Related Entities

Explore More HTML Entities

Browse our complete reference of 262 HTML entities with codes, examples, and usage tips.