asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > XMP Element

<xmp> Element


Renders text in a fixed-width font, typically used for examples.HTML 2, 3.2 Deprecated

HTML Syntax

Remarks

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.

Attributes

The <xmp> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

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:

<html> <head> Header info goes here </head> <body> Body content goes here </body> </html>
See Also

CODE   KBD   PRE   SAMP   TT



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note