Template:Pre/Documentation
Usage
This template supports two parameters:
|width=
The width of the pre "box". This can take any of the usual CSS units, but using anything other tham em
or %
is unwise, as different screens can behave unpredictably with absolute sizes.
|space=
The way white space is handled in the pre "box". This can take any of the usual options for white-space
in CSS. This will default to the behavour of |space=pre-wrap
.
As with <pre>
and <code>
, {{pre}} displays text in the font specified as the monospace font in the user's browser options, or specified in the user's CSS pages.
Examples
Example 1:
{{Pre| This Pre-format can look like this. }}
Renders as:
This Pre-format can look like this.
Example 2:
{{Pre|width=50%| '''Long text wrapping:''' all work and no play make jack a dull boy all work and no play make jack a dull boy all work and no play make jack a dull boy all work and no play make jack a dull boy all work and no play make jack a dull boy. }}
Result:
Long text wrapping: all work and no play make jack a dull boy all work and no play make jack a dull boy all work and no play make jack a dull boy all work and no play make jack a dull boy all work and no play make jack a dull boy.