Template:Nbsp

From Angelina Jordan Wiki

 

Documentation

This template produces a non-breaking space (optionally between two specified inputs — see the examples below). There is a narrow-space equivalent called {{nnbsp}}.

The name of this template is based on the phrase "non-breaking space" (or perhaps "no-break space").

Usage

  • {{nbsp}}
  • {{nbsp|text before space|text after space}}
  • {{nbsp|text to be ignored by the template}}

Note that if only one input is given, that input is ignored. This feature can be used to provide comments to future editors, but that might be a little confusing.

Examples

  • 2{{nbsp}}p.m. ⇒ 2 p.m.
  • {{nbsp|2|p.m.}} ⇒ 2 p.m.
  • 2{{nbsp}}p.m.{{nbsp|previous period is not the end of the sentence!}}broadcast ⇒ 2 p.m. broadcast

The first two examples are equivalent.

The narrow-space version of this template, {{nnbsp}}, is more appropriate for use between punctuation characters. Here is a comparison of the sizes of these spaces:

  • <span style="background-color:black">{{nnbsp}}</span>
  • <span style="background-color:black">{{nbsp}}</span>

 ⇒ 
 ⇒