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>


plaintext tag example


The <plaintext> tag supports the Global Attributes.

Browser support

chrome firefox safari opera

Practice Your Knowledge

What is the function of the <plaintext> tag in HTML?

Quiz Time: Test Your Skills!

Ready to challenge what you've learned? Dive into our interactive quizzes for a deeper understanding and a fun way to reinforce your knowledge.

Do you find this helpful?