Connected: An Internet Encyclopedia
5.5.2.1. Example and Listing: XMP, LISTING
Up:
Connected: An Internet Encyclopedia
Up:
Requests For Comments
Up:
RFC 1866
Up:
5. Document Structure
Up:
5.5. Block Structuring Elements
Up:
5.5.2. Preformatted Text: PRE
Prev: 5.5.2. Preformatted Text: PRE
Next: 5.5.3. Address: ADDRESS
5.5.2.1. Example and Listing: XMP, LISTING
5.5.2.1. Example and Listing: XMP, LISTING
The <XMP> and <LISTING> elements are similar to the <PRE> element,
but they have a different syntax. Their content is declared as CDATA,
which means that no markup except the end-tag open delimiter-in-
context is recognized (see 9.6 "Delimiter Recognition" of [SGML]).
NOTE - In a previous draft of the HTML specification, the syntax
of <XMP> and <LISTING> elements allowed closing tags to be treated
as data characters, as long as the tag name was not <XMP> or
<LISTING>, respectively.
Since CDATA declared content has a number of unfortunate interactions
with processing techniques and tends to be used and implemented
inconsistently, HTML documents should not contain <XMP> nor <LISTING>
elements -- the <PRE> tag is more expressive and more consistently
supported.
The <LISTING> element should be rendered so that at least 132
characters fit on a line. The <XMP> element should be rendered so
that at least 80 characters fit on a line but is otherwise identical
to the <LISTING> element.
NOTE - In a previous draft, HTML included a <PLAINTEXT> element
that is similar to the <LISTING> element, except that there is no
closing tag: all characters after the <PLAINTEXT> start-tag are
data.
Next: 5.5.3. Address: ADDRESS
Connected: An Internet Encyclopedia
5.5.2.1. Example and Listing: XMP, LISTING