Level: 0
The preformatted text element
<pre>
presents sections in
fixed-width font, and so is suitable for text which has been
formatted for a teletype by some existing formatting system.
The
<pre>
element may be used with the optional
width
attribute,
which is a Level 1 feature. The
width
attribute specifies the
maximum number of characters for a line and allows the
presentation system to select a suitable font and indentation.
Where the
width
attribute is not present, it is recommended that
a width of 80 be assumed. Where
width
is supported, it is
recommended that at least widths of 40, 80 and 132 characters
be presented optimally, with other widths being rounded up.
Within preformatted text:
Line boundaries within the text are rendered as a move to the beginning of the next line, except for one immediately following or immediately preceding a tag.
The
<p>
tag should not be used. If found, it should be
rendered as a move to the beginning of the next line.
Anchor elements and character highlighting elements may be used.
Elements which define paragraph formatting (Headings, Address, etc) must not be used.
The ASCII Horizontal Tab (ht
) character must be
interpreted as the smallest positive nonzero number of
spaces which will leave the number of characters so far
on the line as a multiple of 8. Its use is not recommended
however.
An example of using the
<pre>
element is:
<pre width="80">
This is an example line.
</pre>