I'm not sure what your goals are here. But, I might suggest using https://code.google.com/p/google-code-prettify/

I started using it on my blog, and I'm quite happy with it. I believe stackoverflow uses it as well.