Template:Nowrap

From MozillaWiki
Jump to: navigation, search

{{{1}}}

Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

{{nowrap}} prevents word-wrapping, i.e. line breaks, within text or inside a link which contains spaces or hyphens.

Nota bene

The length of the non-wrapped text becomes the minimum width of that paragraph, and doesn't adjust to different browser window sizes. Hence, a non-wrapped text will continue to the right (or to the left, if rtl) when the window edge is reached, and make the browser show a horizontal scrollbar (and also create a lot of unused space). Before you use this template, you should consider how the non-wrapped text may affect other elements on the page, and how it may affect the accessibility for your readers.

If you have a very long text string that need to be non-wrapped, consider rephrasing it and dividing it into parts before you apply this template.

Parameters

There is only 1 parameter, which is unnamed and required.

Syntax

The template's syntax is

  • {{nowrap|custom text }}

Required parameter

1

Custom text string
Usage
  • {{nowrap|1}}

Examples

Case What you type What you see
Basic use This text will not wrap}} This text will not wrap
Wiki markup You '''can''' ''use'' <u>wiki</u> {{sup|markup}}}} You can use wiki markup

Inadvisable use

As mentioned above, very long text strings will cause dispositional issues, and make the page as a whole less accessible.

Case What you type What you see Comments
Long text string Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet consectetur adipisci[ng] velit, sed quia non numquam [do] eius modi tempora inci[di]dunt, ut labore et dolore magnam aliquam quaerat voluptatem.}} Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet consectetur adipisci[ng] velit, sed quia non numquam [do] eius modi tempora inci[di]dunt, ut labore et dolore magnam aliquam quaerat voluptatem. This comment is not easy to find.