In order to display code on this blog, I’ve installed the WP-GeSHi-Highlight plug-in.
Whilst this works well, it does mean that posts need to be edited via the text editor, otherwise the code is interpreted. An alternative would be to escape all of the HTML and then highlight…
<p class="element-invisible">Here is a paragraph</p>
<div>A block element</div>
<img src="/img/test.png" alt="foobar">