Obsolete Elements
Three elements have been deleted in favor
of an existing element that has been doing the job of all four in
browser implementations for a long time. The three obsolete elements
are LISTING
, PLAINTEXT
, and
XMP
. The popular PRE
element is
the one you should use for displaying preformatted text. The HTML 4.0
recommendation leaves implementation details, such as the treatment
of whitespace, the default font setting, and word wrapping, up to
browsers. Typically, PRE
elements are rendered in
Courier and they honor carriage returns inserted in the
text.
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.