Template:Nbsp/doc

From Angelina Jordan Wiki
Revision as of 02:03, 21 June 2024 by Dcljr (talk | contribs) (template created, based on Template:Nnbsp)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a subpage documenting Template:Nbsp. To change the template, edit that page; to change the template's documentation (seen below), edit this one.

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>

 ⇒ 
 ⇒