HTML tag to prevent HTML tags to be executed?

This:

The html code for < is <

Renders as:

The html code for < is &lt;

The basic strategy is to escape the & as &amp;


In this case, you DON'T need to encode it. Try this one:

<xmp> html < &lt; </xmp>

I'm not sure about cross browsers support, but works on IE7,FF3,Chrome3


You are going to have to do it manually.

Here you have the full encoding table. The most commonly used codes are:

Character  Entity Number  Entity Name  Description
"          &#34;          &quot;       quotation mark
'          &#39;          &apos;       apostrophe (does not work in IE)
&          &#38;          &amp;        ampersand
<          &#60;          &lt;         less-than
>          &#62;          &gt;         greater-than

Tags:

Html

Xhtml