HTML <plaintext> Tag

The <plaintext> tag tells the browser, that its content must be displayed as an ordinary text without formatting. All the nested tags in this element are rendered by the browser as a part of the text. The content of the <plaintext> tag is represented in monospaced font. The monospaced font can be applied to any HTML element using the CSS font-family style with the "monospace" generic value.

The <plaintext> is a deprecated HTML tag, instead of it use the <pre> tag, or the <code> tag, if semantically accurate.
In the case, where <plaintext> is the first element on the page, using HTML is not preferable. Instead, you can serve a text file with the text/plain MIME-type.


The <plaintext> tag is empty, which means that the closing tag isn’t required.

Example of the HTML <plaintext> property:

<!DOCTYPE html>
    <title>Title of the document</title>
    <p>The tag content looks like this:</p>
    <h1>Main title of the document</h1>
    <p>First paragraph of the text</p>



The <plaintext> tag supports the Global Attributes.

Browser support


Do you find this helpful?

Related articles