HTML <xmp> tag

Updated: 05/21/2018 by Computer Hope

HTML xmp tagWhen writing in HTML, the <xmp> tag was used to designate that a section of text was an HTML example. Anything typed between its opening and closing tags was not interpreted as HTML and displayed in monospaced font. The following sections contain information about this tag, including an example of its code, as well as related attributes and browser compatibility.

Warning: The <xmp> tag has been deprecated since HTML version 3 because it is conflicts with SGML. The <pre> or <code> tags should be used instead. Additionally, if text in the tag contains the characters < and &, they should be replaced with &lt; and &amp; respectively. For more information, see the HTML3 spec and the W3C's HTML documentation on Github.

Example code

<xmp>Itallic font should be marked up using the <i> and </i> tags.</xmp>

Old Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. The <wbr> tag is no longer supported, but at one time it utilized all of the standard attributes.


Internet Explorer Firefox Safari Opera Chrome
Not Supported Not Supported Not Supported Not Supported Not Supported

Browser, Code, Compatibility, Optimized, Web design terms