How to use plaintext element In HTML

The plaintext element is deprecated which means this feature is no longer supported. Though some browsers might still support it, it is not recommended to use.

Example 1: we are using html entity names to display the body elements and paragraph elements on the web page.

HTML




<!DOCTYPE html>
<html>
<head>
    <title>Plain text </title>
</head>
<body>
    <pre>
        Paragraph element: <p> </p>
        Body element : < body > < /body >
    </pre>
</body>
</html>


Output:

Output

How to display HTML tags as plain text in HTML ?

In this article, we will learn how to display HTML tags as plain text in HTML. We can replace the plain text by using < with   &lt; or &60; and >   with  &gt; or &62; on each HTML tag.

Similar Reads

HTML Entities:

Sign Description Entity name Entity number < Less than(start of HTML element) < < > Greater than(end of HTML element) > > “ Double quotation " “ & Ampersand ( beginning of HTML entity) & &...

Using plaintext element:

The plaintext element is deprecated which means this feature is no longer supported. Though some browsers might still support it, it is not recommended to use....

HTML entities

...