MistyD MistyD - 2 months ago 6
HTML Question

Display HTML tag characters as plain text

How do I display

<b> > Greater than <b>
<b> < Less Than <b>
<b> <> Not Equal to <b>


In the above code The greater than sign does not show up in bold. Same goes for the others

Answer

You need to use ampersand html character codes

Note the bolded < > signs in the first set.

<b> &gt; Greater than </b>
<b> &lt; Less Than </b>
<b> &lt;&gt; Not Equal to </b>


<p> 
    &gt; Greater than 
    &lt; Less Than 
    &lt;&gt; Not Equal to 
</p>