For questions in Java/JavaScript where the sample code can easily be boiled down, I usually see that the inline code formatting is sufficient. For web-related questions, usually involving HTML, CSS, and JavaScript, use http://jsfiddle.net.
Thanks. jsfiddle looks interesting. I will try it out. Unfortunately, for HTML/CSS/Javascript, we cannot boil down code into small parts, given the visual aspect of things. So, I agree with what you are saying.