Show the working code of the HTML page you did and we might be able to wrap our heads around it. I guess it’s doable with shortcodes or even just inline.
Hint:
## heading ## {#id .className attrName=attrValue class="class1 class2"}
results in
<h2 heading id="id" class="className class1 class2" attrName="attrValue">heading</h2>