Template:Nbsp

Revision as of 01:56, 1 April 2026 by Iritscen (talk | contribs) (docs: fixed an oopsie, linked to other related template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The non-breaking space template places a special character in the text indicating that a space should be placed here but that it should not be possible to break the line on said space. This is useful when you don't want some text to be treated as separate words, such as the terms making up a short BSL command in a paragraph. This block of text should wrap awkwardly on your screen due to the presence of spaces in the command:

Let's say you're interested in Konoko's unused tower-cleared line. For lines like this one, listed as UNUSED, you can play them if you enter chr_talk 0 OSBD_name in the developer console.

Note how awkwardly that command reads, plus it is more difficult for the reader to copy-paste. This version inserts a call to this template between each term in the BSL command:

Let's say you're interested in Konoko's unused tower-cleared line. For lines like this one, listed as UNUSED, you can play them if you enter chr_talk 0 OSBD_name in the developer console.

This template can also be used to force multiple sequential spaces to be rendered as such; normally the HTML standard dictates that multiple spaces are treated as a single space. But this should not be used in large quantities to force-align blocks of content, as there are smarter ways to do this using MediaWiki table markup, CSS margin and text-align directives, etc.

Related templates

To prevent a linebreak from happening after a hyphen, you need the non-breaking hyphen.

To accomplish the opposite of this template – to encourage the browser to render a linebreak in the midst of some text, use the soft break template.