How to display HTML code in WordPress

I cannot seem to get WordPress to display HTML code. It wants to render the code as HTML and I want it to show the HTML as code as I am putting up a short HTML/CSS tutorial for my students.

I have tried using pre tags and that it doesn’t work. I was thinking of putting up some GIF files, but I want the students to be able to cut-and-paste the code.

Is there a WordPress plug-in or technique that will allow me to show un-rendered HTML code?

All the best,

Wild

Prob’ly the 2 characters most likely to be the problem is the < and > characters. Use < and > instead. They will render as those two characters, but they will not trigger the HTML parsing. Here is a whole bunch of special characters you might find useful: http://www.tedmontgomery.com/tutorial/HTMLchrc.html

Jim

It my be as simple as putting the code inside code tags. Or you could change “special” characters to entities. eg. < as &#60; or &lt;

I haven’t tried this plugin http://wordpress.org/extend/plugins/code-markup/
or any of the code syntax highlighting plugins.

*hint, click on the “tags” to see related plugins.

There is an excellent post explaining how to display html source code in your wordpress posts (syntax highlighting too if you want it)

http://www.theblogaholic.com/2011/01/16/displaying-html-source-code-in-wordpress-posts/