No, posting HTML in the Markdown editor is not dangerous as it is sanitised (both by the Markdown editor and by Q2A itself). <script> tags and most HTML attributes are removed. As far as I know there is no way to use Markdown but disallow HTML, the Markdown spec includes the ability to use HTML.
As for your edit, on this site we use the CKEditor plugin, which is a "WYSIWYG" (What You See Is What You Get) editor. So when you type <h1> into here it encodes the <> characters.
However you can still use headings from the drop down menus: