Formatting (i.e., escaping) your code/html/css
Hi. Yes. Actually, a good idea posting this question as others can find this and point to here when other such questions/situations arise.
You can surround your code with 2 triple backtick lines. They must be on their own lines and have no leading or trailing whitespace, nor other characters.
/* code, css or html code goes here */
The easiest is to highlight your code, and click the
Similarly, for html:
<!-- html markup goes here -->
I believe it works for Ruby (i.e., use
ruby), as well, and perhaps other languages.
There are at least a couple other ways, but those should work well for 90% of the cases.
P.S. I'm pretty sure
pre tags don't work well in this forum, I believe because of css classes applied to them. So, best to avoid them here.
code tags do work, technically, but they're a pain for mult-line code/markup, and I only use them in certain cases.