The P tag that holds the IMG tag needs a unique class

There was some discussion about adding optional classes via a consistent attribute syntax.

However, the HTML version is totally fine as well. It’s more long winded, but it it will work with every CommonMark implementation.

I don’t think the spec should include a default class because that could clash with other classes on the page. But perhaps your specific renderer could add a class in a post processing step. Another option would be to add a CSS rule to add particular styling to all p tags within the div that contains the contents of the Markdown document.

1 Like