Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

<plaintext>: The Plain Text element (Deprecated)

The<plaintext>HTML element renders everything following the start tag as raw text, ignoring any following HTML. There is no closing tag, since everything after it is considered raw text.

Warning:Do not use this element.

  • <plaintext> is deprecated since HTML 2, and not all browsers implemented it. Browsers that did implement it didn't do so consistently.
  • <plaintext> is obsolete; browsers that accept it may instead treat it as a<pre> element that still interprets HTML within.
  • If<plaintext> is the first element on the page (other than any non-displayed elements, like<head>), do not use HTML at all. Instead serve a text file with thetext/plainMIME-type.
  • Instead of<plaintext>, use the<pre> element or, if semantically accurate (such as for inline text), the<code> element. Escape any<,> and& characters, to prevent browsers inadvertently parsing the element content as HTML.
  • A monospaced font can be applied to any HTML element via aCSSfont-family style with themonospace generic value.

Attributes

This element has no other attributes than theglobal attributes common to all elements.

DOM interface

This element implements theHTMLElement interface.

Specifications

Specification
HTML
# plaintext

Browser compatibility

See also

  • The<pre> and<code> elements, which should be used instead.
  • The<xmp> element, also obsolete, similar to<plaintext>.

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp