Changes

Jump to navigation Jump to search
Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> {{tl|{{PAGENAME}}}} uses <code>:w:HTML element#Other containers|<pre&g..."
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->

{{tl|{{PAGENAME}}}} uses <code>[[:w:HTML element#Other containers|&lt;pre&gt;]]</code> tags, but with text that is either [[:w:word wrap|wrapped]] or is contained in a horizontal scrollbox. This means the text will not stretch past the right side of the screen.

As it uses real &lt;pre&gt; tags (unlike {{tl|pre}}), it will be displayed correctly regardless of how the user's Wikipedia [[:w:WP:SKIN|skin]] renders &lt;pre&gt; boxes.

If you want to disable [[:w:WP:Wikitext|wikitext]] in it, you should use &lt;nowiki> tags inside the template (see [[#wikitext|below]]).

==Usage==
===Wrapped text===
<span style="background-color:white"><code><nowiki>{{Pre2|Text to be displayed. And more and more and more... and a paragraph break.</nowiki>
<p>
<nowiki>And then more and more...}}</nowiki></code></span>
:produces:
{{Pre2|Text to be displayed. And more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and a paragraph break.

And then more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more.}}

===Scrollbox===
<span style="background:white"><code><nowiki>{{Pre2|scroll|Text to be displayed. And more and more and more... and a paragraph break.</nowiki>
<p>
<nowiki>And then more and more...}}</nowiki></code></span>
:produces:
{{Pre2|scroll|Text to be displayed. And more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and a paragraph break.

And then more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more.}}

==Using wikitext {{anchor|wikitext}}==

To disable [[:w:WP:Wikitext|wikitext]] (e.g. <nowiki>[[</nowiki>links<nowiki>]]</nowiki>), &lt;nowiki> tags must be used in the form:

<span style="background:white"><code><nowiki>{{Pre2|&lt;nowiki>Your text{{dn|name=Pre2}}, which ''might'' include {{tl|templates}}.&lt;/nowiki>}}</nowiki></code></span>

This will produce this:
{{Pre2|<nowiki>Your text{{dn|name=Pre2}}, which ''might'' include {{tl|templates}}.</nowiki>}}

as opposed to:
{{Pre2|Your text{{dn|name=Pre2}}, which ''might'' include {{tl|templates}}.}}

==See also==
* {{tl|pre}}, which mimics &lt;pre&gt; tags as rendered with the monobook Wikipedia skin
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->

[[Category:Formatting and function templates]]

</includeonly>
Anonymous user

Navigation menu