<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://syncellwiki.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3ANowrap%2Fdoc</id>
	<title>Template:Nowrap/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://syncellwiki.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3ANowrap%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://syncellwiki.org/wiki/index.php?title=Template:Nowrap/doc&amp;action=history"/>
	<updated>2026-04-04T11:13:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://syncellwiki.org/wiki/index.php?title=Template:Nowrap/doc&amp;diff=408&amp;oldid=prev</id>
		<title>imported&gt;W.andrea: /* Usage */ formatting</title>
		<link rel="alternate" type="text/html" href="https://syncellwiki.org/wiki/index.php?title=Template:Nowrap/doc&amp;diff=408&amp;oldid=prev"/>
		<updated>2025-07-10T11:29:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage: &lt;/span&gt; formatting&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
{{used in system|in [[MediaWiki:Histlegend]]}}&lt;br /&gt;
{{cascade-protected template}}&lt;br /&gt;
{{COinS safe|n}}&lt;br /&gt;
{{tsh|nobr|nobreak|nwr|nbr}}&lt;br /&gt;
&lt;br /&gt;
{{tlx|Nowrap}} or {{tlx|nowrap}} stops [[Line wrap and word wrap|wrapping]] of specific text (which can be inside of a link). Use this template &amp;#039;&amp;#039;&amp;#039;sparingly&amp;#039;&amp;#039;&amp;#039;. It prevents word wraps (line breaks) that might otherwise happen at spaces, hyphens&amp;amp;nbsp;(&amp;quot;-&amp;quot;), or, in some browsers, parentheses. The size of the nowrapped text becomes the minimum width of that paragraph and that can negatively influence the ability of the page to adapt to smaller screens, or alternate representations of the content.&lt;br /&gt;
&lt;br /&gt;
To achieve the opposite effect of &amp;lt;code&amp;gt;&amp;amp;#123;&amp;amp;#123;nowrap&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt;, you can use {{tlx|wbr}}. For more information about wrapping and breaking sentences, see [[Wikipedia:Line-break handling]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap|these words stay together}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap|a, b, c, or d.}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap| merry-go-round }}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap| [[4-part harmony]] }}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap| [[Cascading Style Sheets|CSS]] }}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap| [[#Examples|Examples section]] }}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
|&amp;quot;&amp;lt;code&amp;gt;They held {{tlc|Nowrap|10 kg (22 lb)}} in total.&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
&amp;lt;br/&amp;gt; May render like this:&lt;br /&gt;
:They held {{Nowrap|10 kg (22 lb)}} &amp;lt;br/&amp;gt;in total.&lt;br /&gt;
&amp;lt;br/&amp;gt; Or like this:&lt;br /&gt;
:They held &amp;lt;br/&amp;gt;10 kg (22 lb) in total.&lt;br /&gt;
&amp;lt;br/&amp;gt; But &amp;#039;&amp;#039;not&amp;#039;&amp;#039; render like this:&lt;br /&gt;
:They held 10 kg (22 &amp;lt;br/&amp;gt;lb) in total.&lt;br /&gt;
&lt;br /&gt;
| &amp;quot;&amp;lt;code&amp;gt;He encountered {{tlc|Nowrap|a tiger}} in the woods.&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
&amp;lt;br/&amp;gt; May render like this:&lt;br /&gt;
:He encountered a&amp;amp;nbsp;tiger &amp;lt;br/&amp;gt;in the woods.&lt;br /&gt;
&amp;lt;br/&amp;gt; Or like this:&lt;br /&gt;
:He encountered &amp;lt;br/&amp;gt;a tiger in the woods.&lt;br /&gt;
&amp;lt;br/&amp;gt; But &amp;#039;&amp;#039;not&amp;#039;&amp;#039; like this:&lt;br /&gt;
:He encountered a &amp;lt;br/&amp;gt;tiger in the woods.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Controlling line-breaking in infoboxes ===&lt;br /&gt;
This template may be used with {{tlx|Wbr}} and {{tlx|Spaces}} to control line-breaking in bulletless lists in infoboxes, to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details.&lt;br /&gt;
&lt;br /&gt;
=== Handling equal-sign or bar ===&lt;br /&gt;
[[Help:Template|Templates]] have problems with parameter data that contains [[equal-sign]]s &amp;quot;&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&amp;quot; or vertical bars &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot; (pipes). Note that this does not apply if the equal-sign &amp;quot;&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&amp;quot; or vertical bar &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot; is inside a wikilink or another template. In the case that there is a bare equal-sign &amp;quot;&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&amp;quot; or vertical bar &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot;, consider using {{tl|Nowrap begin}} + {{tl|Nowrap end}} instead. However, there are also other workarounds:&lt;br /&gt;
&lt;br /&gt;
For text that includes an equal-sign &amp;quot;=&amp;quot;, precede the text with &amp;lt;code&amp;gt;1=&amp;lt;/code&amp;gt;, use a triple-brace unnamed parameter &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{{|=}}}&amp;lt;/syntaxhighlight&amp;gt;, or the &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{=}}&amp;lt;/syntaxhighlight&amp;gt; magic word. For example:&lt;br /&gt;
:&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap|1=2 + 2 = 4}}&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap|2 + 2 {{{|=}}} 4}}&amp;lt;/syntaxhighlight&amp;gt;, or &amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap|2 + 2 {{=}} 4}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which all render as this:&lt;br /&gt;
:{{Nowrap|1=2 + 2 = 4}}.&lt;br /&gt;
&lt;br /&gt;
For text that includes a vertical bar &amp;quot;|&amp;quot;, escape the bar(s) with &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;&amp;amp;#124;&amp;lt;/syntaxhighlight&amp;gt;&amp;quot; or &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{pipe}}&amp;lt;/syntaxhighlight&amp;gt;&amp;quot; or &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{abs}}&amp;lt;/syntaxhighlight&amp;gt;&amp;quot;. For instance, put two bars &amp;quot;|6|&amp;quot; like this:&lt;br /&gt;
:&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap|&amp;amp;#124;6&amp;amp;#124; &amp;lt; 7}}&amp;lt;/syntaxhighlight&amp;gt; &amp;amp;nbsp;or&amp;amp;nbsp; &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap|{{pipe}}6{{pipe}} &amp;lt; 7}}&amp;lt;/syntaxhighlight&amp;gt; &amp;amp;nbsp;or&amp;amp;nbsp; &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;{{Nowrap|{{abs|6}} &amp;lt; 7}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which renders this: &lt;br /&gt;
:{{Nowrap|&amp;amp;#124;6&amp;amp;#124; &amp;lt; 7}}&lt;br /&gt;
&lt;br /&gt;
== Technical details ==&lt;br /&gt;
&lt;br /&gt;
The actual code that does the job is this HTML {{tag|span|open|link=yes}} tag that applies a class to the text inside the template:&lt;br /&gt;
&lt;br /&gt;
:{{code|lang=html|1=&amp;lt;span class=&amp;quot;nowrap&amp;quot;&amp;gt;This text will not wrap&amp;lt;/span&amp;gt;}}&lt;br /&gt;
The class &amp;lt;code&amp;gt;nowrap&amp;lt;/code&amp;gt; receives the CSS property {{code|lang=css|white-space: nowrap;}} in [[MediaWiki:Common.css]].&lt;br /&gt;
&lt;br /&gt;
== TemplateData ==&lt;br /&gt;
{{TemplateData header}}&lt;br /&gt;
&amp;lt;templatedata&amp;gt;{&lt;br /&gt;
  &amp;quot;description&amp;quot;: &amp;quot;Prevents word wraps (line breaks) within text or inside a link which contains spaces or hyphens (-).&amp;quot;,&lt;br /&gt;
  &amp;quot;params&amp;quot;: {&lt;br /&gt;
    &amp;quot;1&amp;quot;: {&lt;br /&gt;
      &amp;quot;label&amp;quot;: &amp;quot;Text&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;Text or link to be protected.&amp;quot;,&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
      &amp;quot;required&amp;quot;: true&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
{{List of nowrap-like templates}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --&amp;gt;&lt;br /&gt;
[[Category:Line-handling templates]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;W.andrea</name></author>
	</entry>
</feed>