Home > Abakada: Back to Basics > Language References > HTML Elements > XMP Element
Renders text in a fixed-width font, typically used for examples. | HTML 2, 3.2 Deprecated |
HTML Syntax
<xmp
class = classname
id = value
style = css_style_rules
title = text
>
The <xmp
> element displays a sequence of literal characters in the browser’s default fixed-width font.
xmp is typically used to dsiplay examples.
All white space, line breaks and even text that includes characters that HTML normally interprets, such as the symbols that enclose an HTML tag ( < and > ), are rendered exactly as they appear.
This element is a block element. All xmp elements start on a new line, and is preceded by extra space.
NOTE: This element has been deprecated in favor of the <pre> element.
The <xmp>
element has no attribute of its own, but supports global attributes common to all HTML elements.
The following shows how the xmp element may be used.
<p>The basic structure of an HTML document is...
<xmp>
<html>
<head> Header info goes here </head>
<body> Body content goes here </body>
</html>
</xmp>
which would render on a Web page as
The basic structure of an HTML document is:
Header info goes here
Body content goes here
CODE KBD PRE SAMP TT