<body onload="prettyPrint()">In fact all above is well explained at Google Code Prettify site. Site of the JavaScript library used to colorize <pre> and <code> blocks that have class="prettyprint" attribute. I.e. wrap your code into following HTML block to make it colored:

<code class="prettyprint">...</code>The source of this page contains CSS definition with colors for this blog, but you may copy/paste it from the block below: