Forgive me if I'm misunderstanding your point, but :markdown isn't a tag that gets output to html, it just designates the beginning of the block to be processed with markdown, so classes and ids aren't applicable. If you want the markdown block in a class or id, you just do this:
#id.class
:markdown
[A link](/path)
outputs: <div id="id" class="class">
<a href="/path">A link</a>
</div>