We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.


The HTML Plaintext Element (<plaintext>) renders everything following the start tag as raw text, without interpreting any HTML. There is no closing tag, since everything after it is considered raw text.

Note: Do not use this element. 
  • This element has been deprecated since HTML 2 and was never implemented by all browsers; even those that did implement it didn't do so consistently. In addition, it is obsoleted in HTML 5; browsers that still accept it may simply treat it as a <pre> element, which still interprets HTML within, even though that's not what you probably want.
  • If the <plaintext> element is the first element on the page (other than any non-displayed elements), do not use HTML at all. Configure your server to send your page with the text/plain MIME-type.
  • Instead of using this element, you should use the <pre> element or, if semantically accurate (such as for inline text), the <code> element. Be sure to escape any "<", ">" and "&" characters, to avoid inadvertently interpreting content as HTML.
  • A monospaced font can also be applied to a simple <div> element by applying an adequate CSS style using monospace as the generic-font value in a font-family property.


This element has no other attributes than the global attributes, common to all elements.

DOM interface

This element implements the HTMLElement interface.

Implementation note: Up to Gecko 1.9.2 inclusive, Firefox implements the interface HTMLSpanElement for this element.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No No No1 No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No No No1 No No No

1. Before Firefox 4, this element implemented the HTMLSpanElement interface instead of the standard HTMLElement interface.

See also


最近更新: Sheppy,