Deprecated in HTML5. Do not use.

<xmp> HTML Tag

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Element of
Learn How Fonts And Web Typography Work In HTML: A Beginner's Guide
What does <xmp> HTML Tag do?
The <xmp> element was used to surround HTML example text that should be rendered without interpreting any HTML elements between the opening and closing <xmp> tags. The element was deprecated in HTML 3.2 and is now obsolete.

<xmp> was designed to render content exactly as typed, without compressing spaces. This was intended as a way to display code. However, this element was never fully supported and is now obsolete.

Read more about <xmp>, and the reasons for its deprecation.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for and runs a content agency, Red Robot Media.