Old question that got dusted off today when I linked to it in this MSO question.
I really like Shog9's answer, but I go one step further, personally, in my use of headings.
I believe that, for answers, the least obtrusive use of headings is the best. By that, I mean that I use the smallest (highest numbered) headings possible for the structure of my answer.
So if I only have one level of heading to separate multiple sections of an answer, I use H4 (since I didn't realize until today that H5 was an option, and it's really only the same thing as adding a "bold" tag anyway):
Some paragraph content.
Some more paragraph content.
Side Note: And apologies for the semantically incorrect use of blockquotes to indent. I spent 15+ minutes trying to get this example to indent properly with hard spaces and non-breaking spaces, but Stack has a formatting issue (it seems) when using Headings with non-breaking spaces.
In the extremely rare case that I might need two levels, I would add the H3 as the top level. But I would try to flatten out the structure first.
I understand that this "breaks the normal rules" when it comes to, say, always starting with an H1, followed by an H2, etc. But those rules are meant for the HTML page itself. Answers are not an HTML page. They are database content that gets inserted into an HTML page.
That database content, and the users who create them, are not expected to have any knowledge of the page into which they will be inserted. In a typical Stack question/answer, the current page structure is that the question title itself is formatted H1. So that technically means (if you take the W3C recommendations literally and try to apply them to Markdown) that any answer headings should start with H2.
- How is the typical Stack user supposed to know this? Are they supposed to examine the page markup before using headings in their answers? (Rhetorical question - No.)
- There is no future guarantee that an additional heading level might be added by Stack, or even removed.
So no, IMHO Markdown formatting should not, and cannot, follow the "HTML Rules" for the use of headings.
It would be great if (pie in the sky) Stack could adjust the Markdown headings (and their formatting) to the semantic structure of the page itself, but this honestly seems like overkill.