HTML <plaintext> Tag
Deprecated: Not Supported in HTML5.
Example
<p>This is outside the plaintext element</p>
<plaintext>
<p>This is inside the plaintext element</p>
</plaintext>
<p>This is outside the plaintext element</p>
Meaning
The <plaintext> element renders the enclosed text as plain text and forces the browser to ignore any enclosed HTML.
This element is no longer part of the HTML standard and should never be used.
Notes:
- Browsers might not recognize closing tag because it render enclosed HTML elements.
- No closing tag for this element is necessary because the browser will ignore all tags after the starting tag.
- <plaintext> element should not be used. Plain text information can be specifies by a file type, and information can be inserted in a preformatted fashion using the <pre>element.
- <plaintext> is deprecated since HTML 2, and not all browsers implemented it. Browsers that did implement it didn't do so consistently.
- Instead of <plaintext>, use the <pre> element or, if semantically accurate (such as for inline text), the <code> element.
- A monospaced font can be applied to any HTML element using a CSS font-family style with the monospace value.
Version: HTML 2.0
Standard Syntax
<plaintext>...</plaintext>
Browser Support
Status
Global Attributes
The <plaintext> element also supports the Global Attributes in HTML.
Event Attributes
The <plaintext> element also supports the Event Attributes in HTML.
By Default CSS Value(s)
Most of the browsers will display the <plaintext> element with the following by default value(s)
plaintext {
font-family: monospace;
white-space: pre;
}