No-Break Space (U+00A0) – Copy And Paste NBSP [ ]

5/5 - (1 vote)

A No-Break Space (U+00A0) is a typographic character that prevents a line break or word wrap between the characters it separates. It is commonly used in documents to ensure that specific elements, such as numbers and their units, or symbols and their associated text, stay together on the same line.

No-Break Space

Copy No-Break Space Character

No-Break Space Character Generator

Enter Number

Copied!

Example

No-Break Space
Without No-Break Space
No-Break Space
With No-Break Space

In this example, the non-breaking space ensures that the “°C” symbol and the preceding amount “25” stay together on the same line, preserving proper formatting and clarity.

No-Break Space

No-Break Space Character Table

Character NameNo-Break Space
Unicode Code PointU+00A0
HTML Entity 
HTML Code 
HTML Hex Code 
CSS Code\00A0
JavaScript/Java/C\u{00A0} (JavaScript and ES6), \\u00A0 (Java and C)
Alt Code255

FAQs

How To Type/Use No-Break Space Character?
  • Control (Option on Mac) + Shift + Space Bar:

On a Mac, you can use Control + Option + Space Bar to insert a nonbreaking space in applications like Microsoft Word or text editors.

  • Pages: Option + Space Bar:

In Apple’s Pages application, you can use Option + Space Bar to insert a nonbreaking space.

  • HTML Entity (HTML):

In HTML, you can use the HTML entity   to insert a nonbreaking space.

  • Alt Code: 255 (Windows 11):

On Windows systems, you can use the Alt code 255 to insert a nonbreaking space.

To do this, press and hold the Alt key, then type 255 using the numeric keypad (not the number keys above the letter keys on your keyboard). Release the Alt key, and a nonbreaking space will appear.

Using No-Break Space in CSS

Indeed, you can use CSS pseudo-elements ::before and ::after to insert content, including nonbreaking spaces, before or after HTML elements

To copy the code, simply double-click on it and press Ctrl+C.

CSS

 .special-text::before {
      content: "\00a0"; 
    }
  .special-text::after {
      content: "\00a0"; 
    }

HTML

<!DOCTYPE html>
<html>
<head>
  <style>
    .special-text::before {
      content: "\00a0"; /* Unicode representation of a nonbreaking space */
    }

    .special-text::after {
      content: "\00a0"; /* Unicode representation of a nonbreaking space */
    }
  </style>
</head>
<body>
  <p>This is some <span class="special-text">special</span> text.</p>
</body>
</html>

We will be happy to hear your thoughts

Leave a reply

Copy & Paste Empty Character & Blank Characters
Logo