{{Obsolete_header}}
Summary
The HTML Plaintext Element (<plaintext>
) renders text following the start tag without interpreting the HTML. It doesn't have an end tag as everything following it is no more considered HTML
Note: Do not use this element.
- It is deprecated since HTML 2 and was neither implemented by all browsers, nor in a consistent way. Even more it is obsoleted in HTML 5 and may be rendered by conforming user-agents as the {{HTMLElement("pre")}} element, which will interpret the internal html !
- If the {{HTMLElement("plaintext")}} element is the first element in the page (except for non-displayed element), do not use HTML at all. Configure your server to send your page with the
text/plain
MIME-type. - Instead use the {{HTMLElement("pre")}} element or if semantically adequate the {{HTMLElement("code")}} element, eventually escaping the HTML '
<
' and '>
' so that they don't get interpreted. - A monospaced font can also be obtained on a simple {{HTMLElement("div")}} element, by applying an adequate CSS style using
monospace
as the generic-font value in a {{cssxref("font-family")}} property.
Attributes
This element has no other attributes than the global attributes, common to all elements.
DOM interface
This element implements the {{domxref('HTMLElement')}} interface.
Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the interface {{domxref('HTMLSpanElement')}} for this element.
See also
- The {{HTMLElement("pre")}} and {{HTMLElement("code")}} elements to be used instead.
- The {{HTMLElement("listing")}} and {{HTMLElement("xmp")}} elements, similar to {{HTMLElement("plaintext")}} but also obsolete.
{{HTMLRef}}