HTML <xmp> tag

Updated: 11/13/2018 by Computer Hope
HTML xmp tag

When 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.


The <xmp> tag is 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 of <xmp> code

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


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.


Edge Internet Explorer Firefox Safari Opera Chrome
Not supported Not supported Not supported Not supported Not supported Not supported

Browser, Code, Compatibility, Optimized, Web design terms