<p>The most favorite feature of StackOverflow for me is that it can automatically detect code in post and set appropriate color to the code.</p>

<p>I'm wondering how the color is set. When I do a <kbd>Ctrl</kbd>+<kbd>F5</kbd> on a page, the code seems first be black text, then change to be colorful. Is it done by jQuery?</p>

From
Stack Overflow Podcast #11
:
Atwood:
It is. Okay, so that comes from, that's a project some Google engineer, I think, wrote it--it's called "Prettify." And it's a little interesting in that it actually infers all the syntax highlighting, which sounds like it couldn't possibly work--it sounds actually insane, if you think about it.  But it actually kind of works.  Now, he only supports it for, there's certain dialects that just don't really work well with it, but for all the dialects that sort of, you'd find on Google. I think it comes from Google's Google Code.  It's the actual code, it's the actual JavaScript which is on Google Code that highlights that the code that comes back when you're hosting projects on Google Code.  And you, and you, um, 'cause I think they use Subversion so you can actually click through...
Spolsky:
How do they know, how do they even know what language you're writing in? And therefore, what a comment is and...
Atwood:
I don't know.  It's crazy.  It's prettify.js, so if anyone's interested in looking at this, just do a web search for "prettify.js," and you'll find it.
And here's where you can find prettify.js:
http://code.google.com/p/google-code-prettify/