HTML - <xmp> Tag



The HTML <xmp> tag specifies preformatted text.

The <xmp> tag is no longer recommended as it is not supported by HTML5. Instead of using this tag, we can use the <pre> element.

Example

Let's look at the following example, where we are going to use the xmp tag

<!DOCTYPE html>
<html>
<head>
   <title>HTML xmp Tag</title>
</head>
<body>
   HTML tags include 
   <xmp><b> for bold text</b>, <i> for italic text.</i></xmp>
</body>
</html>

On running the above code, the output window will pop up, displaying the text on the webpage.

Global Attributes

This tag supports all the global attributes described in − HTML Attribute Reference

html_deprecated_tags.htm
Advertisements