So, it isn't quite true that you cannot add link attributes to a Markdown URL. To add attributes, check with the underlying markdown parser being used and what their extensions are.
In particular, pandoc
has an extension to enable link_attributes
, which allow markup in the link. e.g.
[Hello, world!](http://example.com/){target="_blank"}
rmarkdown
, bookdown
, blogdown
and so on), this is the syntax you want. pandoc
with +link_attributes
Note: This is different than the kramdown
parser's support, which is one the accepted answers above. In particular, note that kramdown differs from pandoc since it requires a colon -- :
-- at the start of the curly brackets -- {}
, e.g.
[link](http://example.com){:hreflang="de"}
In particular:
# Pandoc
{ attribute1="value1" attribute2="value2"}
# Kramdown
{: attribute1="value1" attribute2="value2"}
^
^ Colon