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]).

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.


Next: 5.5.3. Address: ADDRESS

Connected: An Internet Encyclopedia
5.5.2.1. Example and Listing: XMP, LISTING