I looked at your posts and their formatting is fine. Just use common sense.
Following any convention precisely is not as important as the following:
Make the posts easy to skim and easy to read. There are multiple formatting options available to help with this. You don't need to use code blocks exclusively for code and quotation blocks exclusively for quotations. Employ them to improve readability according to your own judgement.
Make the code easy to copy into a notebook. Using a code-block is a must to preserve all special characters.
Beyond that, just think about what people would want to do with the code you posted. Would they want to copy a big block at once? Then it is better not to have In
and Out
labels that they would need to remove manually. But if you are in a hurry, it is still better to write a useful answer with the cell labels left there than not to write an answer at all.
Formatting help is here:
StackExchange uses the same MarkDown as Wolfram Community (except it's a bit more robust and easier to use on SE).
You may want to take a look at this tool, which automates certain formatting tasks:
For example, it can automatically remove In
and Out
labels. I would not always do this if I had to remove them manually. It can also and convert \[Pi]
, \[Element]
, and many others into π
, ∈
, etc.
There is also an image uploader:
But with certain browsers it is just possible to press the "Image" button in the editor toolbar and paste (Ctrl-V) an image.