From Wikipedia, the free encyclopedia
Special character in text processing
"⍽" redirects here and is not to be confused with
␣or
⌴.
In word processing and digital typesetting, a non-breaking space ( ), also called NBSP, required space,[1] hard space, or fixed space (in most typefaces, it is not of fixed width), is a space character that prevents an automatic line break at its position. In some formats, including HTML, it also prevents consecutive whitespace characters from collapsing into a single space. Non-breaking space characters with other widths also exist.
Despite having layout and uses similar to those of whitespace, it differs in contextual behavior.[2][3]
Non-breaking behavior [edit]Text-processing software typically assumes that an automatic line break may be inserted anywhere a space character occurs; a non-breaking space prevents this from happening (provided the software recognizes the character).
For example, if the text "100 km" will not quite fit at the end of a line, the software may break the line between "100" and "km". Using a non-breaking space between "100" and "km" will prevent this behaviour. This guarantees that the text "100 km" will not be broken—if it does not fit at the end of a line, it is moved in its entirety to the next line. For this reason, many style guides recommend using a non-breaking space between numbers and their associated units.[4][5]
In French typography, non-breaking spaces are used before "high punctuation" (:
, ;
, ?
, and !
), on the interior side of guillemets («
and »
), and before footnotes. In the case of ;
, ?
, !
, and footnotes (unless enclosed by parentheses), it is specifically the narrow non-breaking space that is used.[6][7]
In German typography, it is used between multi-part abbreviations (e.g., "z. B.", "d. h.", "v. l. n. r.").[8]
Non-collapsing behavior [edit]A second common application of non-breaking spaces is in plain text file formats such as SGML, HTML, TeX and LaTeX, whose rendering engines are programmed to treat sequences of whitespace characters (space, newline, tab, form feed, etc.) as if they were a single character (but this behavior can be overridden). Such "collapsing" of whitespace allows the author to neatly arrange the source text using line breaks, indentation and other forms of spacing without affecting the final typeset result.[9][10]
In contrast, non-breaking spaces are not merged with neighboring whitespace characters when displayed. They can, therefore, be used by an author to simply insert additional visible space in the resulting output without using spans styled with peculiar values of the CSS "white-space" property. Conversely, indiscriminate use (see the recommended use[citation needed] in style guides), in addition to a normal space, gives extraneous space in the output.
Narrow non-breaking space[edit]U+202F NARROW NO-BREAK SPACE (NNBSP
) is another non-breaking space, but with a smaller width than the standard non-breaking space (U+00A0). When used with Mongolian, its width is usually one third of the normal space;[11] in other contexts, its width is about 70% of the normal space, but may resemble that of the thin space (U+2009), at least with some fonts.[citation needed]
It was introduced in Unicode 3.0 for Mongolian,[12] to separate a suffix from the word stem without indicating a word boundary. It also triggers special shaping of those suffixes.[13] Starting in Unicode 16.0, it is no longer recommended for this purpose, with the Mongolian vowel separator (U+180E) being recommended for this purpose instead.[14][15]
In French typography, it is called espace fine insécable[14] and is used before ;
, ?
, and !
.[6][7] Additionally, footnotes are preceded by a narrow non-breaking space[7] (unless they are enclosed by parentheses, in which case a regular non-breaking space is used).[6]
The narrow non-breaking space is used in numbers as a group separator in French (starting in Unicode CLDR 34[16]) and Venetian (starting in Unicode CLDR 44[17]). In Spanish, the Royal Spanish Academy and Association of Academies of the Spanish Language's Diccionario panhispánico de dudas proscribes the use of a small space as the number group separator,[18] although this is not the case in Unicode's Common Locale Data Repository (CLDR).[19]
Other non-breaking variants defined in Unicode.
WJ
)
On browsers, resizing the window will demonstrate the effect of non-breaking spaces on the texts below.
To show the non-breaking effect of the non-breaking space, the following words have been separated with non-breaking spaces:
Lorem Ipsum Dolor Sit Amet Consectetur Adipiscing Elit Sed Do Eiusmod Tempor Incididunt Ut Labore Et Dolore Magna Aliqua Ut Enim Ad Minim Veniam Quis Nostrud Exercitation Ullamco Laboris Nisi Ut Aliquip Ex Ea Commodo Consequat Duis Aute
To show the non-collapsing behavior of the non-breaking space, the following words have been separated with an increasing number of non-breaking spaces:
Lorem Ipsum Dolor Sit Amet Consectetur Adipiscing Elit Sed Do Eiusmod Tempor Incididunt Ut Labore Et Dolore Magna Aliqua Ut Enim Ad Minim
In contrast, the following words are separated with ordinary spaces:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Here, they are separated with narrow non-breaking spaces, to show the width of those:
Lorem Ipsum Dolor Sit Amet Consectetur Adipiscing Elit Sed Do Eiusmod Tempor Incididunt Ut Labore Et Dolore Magna Aliqua Ut Enim Ad Minim Veniam Quis Nostrud Exercitation Ullamco Laboris Nisi Ut Aliquip Ex Ea Commodo Consequat Duis Aute
Where there is room, leave a (non-breaking) space between the number and the unit.
Use non-breaking spaces between numbers and units (Ctrl+Shift+Space), except for percentages and temperatures (37°C, 76%).
Alle Abkürzungen mit Binnenpunkten werden im Deutschen mit einem gFL [geschütztes flexibles Leerzeichen] spationiert. [...] Die englische Schreibweise sieht keine Abstände zwischen einzelnen Buchstaben vor. Nach einem Binnenpunkt folgt demnach ohne gFL sofort der nächste Buchstabe.
Prior to Unicode Version 16.0, U+202F NARROW NO-BREAK SPACE (NNBSP) was used to represent this small whitespace; it retains its Script_Extensions value of "Mong" to facilitate backward compatibility. However, its role has been taken over by U+180E MONGOLIAN VOWEL SEPARATOR (MVS), which not only prevents word breaking and line breaking, but also triggers special shaping for the following separated suffix.
French grouping separator changed from no-break space U+00A0 to narrow no-break space U+202F.
Para facilitar la lectura de los números cuya parte entera conste de más de cuatro cifras, se recomienda escribirlos separando con un pequeño espacio los grupos de tres dígitos, contados de derecha a izquierda
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3