As adequately explained in this post, Stack Overflow does not have its own syntax highlighting engine but uses Google Code Prettify. It is however possible to override this syntax in use with a language of your own choice.
But does it allow to mix different languages in one snippet? Apparently, the lexer has troubles to handle the following fragment where three languages are used.
<!-- language: lang-js -->
var a = 3;
while( !(a < 0)){
alert("JavaScript code <b>goes</b> here.");
a--;
}
<!-- language: lang-css -->
#content {
margin: 0 auto;
width: 80%;
}
<!-- language: lang-html -->
<div id="content">
<p>Different highlighting in the same snippet</p>
</div>
So, is it possible to mix syntax highlighting?