As per Jeff's suggestion in this comment:
You can use this question as a formatting sandbox. You can
- edit this question itself (Community Wiki questions such as this one require 100 reputation to edit)
- post answers to this question (This question may be protected, requiring earning 10 reputation on this site to answer)
- post comments to this question or its answers
- test suspected bugs with the editor
- post ponies (only when mods are asleep)
Beware that since the changes to syntax highlighting in December 2010, and the inline hints added March 2011, no syntax highlighting is applied unless the question's tags or an inline hint enable it. So, to test highlighting here in the sandbox:
On the start of a line, specify a language inline using
<!-- language: lang -->hints, and indent the code 4 spaces as usual. There is a full list of hints (scroll down a little).<!-- language: lang-html --> While not hinted otherwise: <html></html> source <b>goes</b> "here". <!-- language: lang-js --> var a = 3; while (not (a > 0)) { alert("JavaScript code <b>goes</b> here."); }Or:
Save your post.
Use something like Firebug (Firefox), Web Inspector (Safari, Chrome) or Developer Tools (Internet Explorer 8) to edit the resulting HTML. To open Developer Tools, press F12
Find the
<pre>element and add the attributeclass="prettyprint", or change it into something more specific, likeclass="lang-vb prettyprint".Run the following in the location bar:
javascript:prettyPrint();orprettyPrint();on the console.




Insert Into Posts (Id, PostTypeId, CreationDate, Body, OwnerUserId, Tags) Values (...)– Shadow Wizard May 21 at 7:46Update Posts Set ... Where ...– iBug May 21 at 13:26<s> and </s> tagswork on t̶e̶x̶t̶ in comments. Yes, apparently they do. Weird; someone told me that comments didn't support HTML. – John May 30 at 3:50