How to display HTML tags as plain text

user517593 picture user517593 · Jul 25, 2011 · Viewed 417.2k times · Source

I have an input form on my website where HTML is allowed and I'm trying to add instructions about the use of HTML tags. I'd like the text to

<strong>Look just like this line - so then know how to type it</strong>

But so far all I get is:

Look just like this line - so then know how to type it

How can I show the tags so people know what to type?

Answer

Darm picture Darm · Jul 25, 2011

Replace < with &lt; and > with &gt;.