Template:Wbr/doc

From Guild of Archivists

This template is used to tell the browser of an optional, non-hyphenated line-break. It can be used with:

  • {{spaces}} or the equivalent   (non-breaking space)
  • {{nowrap}} or the equivalent <span style="white-space: nowrap;">...</span> or <span class="nowrap">...</span> (character string that will not break even at a normal space)

to carefully control line-breaking where this is important.

Usage[edit source]

Use is simple; there are no parameters:

Controlling line-breaking in infoboxes[edit source]

This template can be used to cause an indentation after a linebreak, in unbulleted lists inside infoboxes and in tables with constrained cell widths, by using {{wbr}}&nbsp; between words in an entry, so that when they wrap they are not mistaken for separate entries. See example infobox to the side.

Example infobox (rendered to the side of the example code):

Great Zero
Location Ae'gura
Link-in point(s)
  • 5 31,249 6 7 7 0​ (Observation room)
  • 5 26,752 6 4 7 -1​ (Courtyard)
{{Infobox location|
| name = Great Zero
| location = [[Ae'gura]]
|...
|link-ins=
* {{nowrap|{{ki-ps|31249|7|0}}}}{{wbr}} (Observation room)
* {{nowrap|{{ki-ps|26752|4|-1}}}}{{wbr}} (Courtyard)
|...
}}

Technical details[edit source]

This template encapsulates the code <wbr />​, i.e. the HTML5 Word Break Opportunity element followed by the HTML character entity for the Unicode Zero Width Space character. See the Wikipedia template for more information.