Code highlighting
See http://code.google.com/p/google-code-prettify/wiki/GettingStarted
Various other approaches exist, but I found this the easiest:
Google code prettify
To apply automatic code highlighting add jQuery to your page header:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
And google-code-prettify to your body tag:
<body onLoad="$('code,pre').addClass('prettyprint');
$.getScript('http://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?autoload=true')">
It's the same source code highlighting engine as used by Stackoverflow.