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>

Get your free chapter of Level Up Your Web Apps with Go

Get a free chapter of Level Up Your Web Apps with Go, plus updates and exclusive offers from SitePoint.


No Reader comments

Related books & courses
Available now on SitePoint Premium

Preview for $1