Syntax Highlighting with “Code Prettify”
This is now implemented. See Stack Overflow’s help on Syntax Highlighting.
Specifying a language for syntax highlighting
Besides tag inferences (a recent change), you can manually specify a language as a hint to Google Code Prettify.
Here’s how:
<!-- language: «lang-or-tag-here» -->
«code goes here»
«more text»
<!-- language: «lang-or-tag-here» -->
«code goes here»
You may use either a tag or a prettify language code. Prettify language codes are guaranteed to work, regardless of what language the tag happens to be set to.
Available Language Hints Moved
Due to several lists of available hints existing throughout Meta, the entire list has been consolidated and moved to the following FAQ: