plaintext (HTML element)

Tweet

Description

The plaintext element was originally intended to instruct the browser to ignore any formatting or HTML markup , such that <p> would appear in screen as <p> rather than actually create a new paragraph. It is deprecated and is probably best forgotten entirely.

The example shown would render as follows:
plaintext

Example

plaintext being used to demonstrate a code sample:

<p>The markup for this is:</p>
<plaintext><h1>Main heading goes here</h1>
<p>First paragraph goes here</p>
<h2>Sub-heading goes here</h2></plaintext>.

</body>
</html>

Learn HTML5 Online

Get all SitePoint books and courses with a Learnable membership. Start building future-proof websites that are faster, more powerful, and easier to maintain.

No Reader comments