What was the tag used for?

XMP and PRE differ. Content within PRE tags is formatted as follows:

  • Content is shown with a fixed font,
  • All whitespace is preserved, and
  • Each line break begins a new line.

If you want to include special characters such as <, > and & within PRE tags, they must be escaped so that they are not subject to special interpretation by the browser.

In contrast, content within XMP tags does not need to be escaped.

The only character sequence that cannot be included within XMP tags is the XMP end tag (</XMP>).

XMP is still supported by the browsers I have tested. You can try it with xmp.html. View the source to see the tags.

Leave a Comment