Status: Obsolete
The
xmp
and
listing
elements are in use in some locations and
should be recognized by browsers. New servers should use
<pre>
instead.
These styles allow text of fixed-width characters to be embedded absolutely as is into the document. The syntax is:
<listing>
...
</listing>
or
<xmp>
...
</xmp>
The text between these tags is to be portrayed in a fixed width font, so that any formatting done by character spacing on successive lines will be maintained. Between the opening and closing tags:
The text may contain any ISO Latin printable
characters, but not the end tag opener. The
xmp
and
listing
elements have historically used specifications which do
not conform to SGML. Specifically, the text may contain
ISO Latin printable characters, including the tag opener,
as long it they does not contain the closing tag in full.
SGML does not support this form. Implementations may vary on how they interpret end tags apparently within these elements.
Line boundaries are significant, except any occurring immediately after the opening tag or before the closing tag. and are rendered as a move to the start of a new line.
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.
The listing element is portrayed so that at least 132 characters will fit on a line. The XMP elements portrayed in a font so that at least 80 characters will fit on a line but is otherwise identical to listing.