Display HTML code without having it parsed

January 2nd 2008 07:21 pm

Sometimes it is nice to display html code with out it being parsed as html, for example if you are writing a tutorial and want to show how to do something.

To display code, you will need to use a code to display a < or > to prevent the browser from treating it like actual code.

The code to display a < is < while > is >

Displaying codes like I have just done can be a little more tricky. To display the above codes, I had to use the codes to display the & and the ; so that it wouldn’t just show you the < and >.

Confused yet? Basically to show you the code: < I actually had to type in <.

Take a look at http://htmlhelp.com/reference/charset/ for a list of codes.

Posted by bradym under HTML |

Comments RSS

Leave a Reply