Open In App

HTML <xmp> Tag

Last Updated : 12 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The <xmp> tag is used to create any content as letter format. Any text content between this <xmp> tag will display as the user type in the code section, same width, same position ending everything will be displayed as a replica of typed format or style. 

Note: It is not supported in html5.

Syntax:

<xmp> statement </xmp>

Attribute: This tag does not contain any attribute. 

Example: 

html
<!DOCTYPE html>
<html>

<head>
    <title>HTML xmp Tag</title>
</head>

<body>
    <h2>HTML xmp Tag</h2>

    <xmp>This is the basic example of xmp tag.</xmp>
</body>

</html>

Output:

HTML-xmp-Tag

Supported Browsers: The browsers supported by HTML <xmp> tag are listed below:


Similar Reads