I can add attributes to links like this:

#+attr_html: :rel external :target _blank
[[http://www.wikipedia.com][reliable source]]

Now, I have a link in a header:

* DONE Why people talk [[http://www.wikipedia.com][(reliable source)]]

How do I add the attributes to this link in the header?


1 Answer 1


You can't.

Org mode syntax DOES NOT ALLOW one to apply attributes to a span of text in the middle of a paragraph. That is, attributes can be added only to the whole paragraph (via +attr_*:) and to headlines (via :PROPERTIES: ... :END:).

Well, the previous sentence is a (kind of) lie.

If you define a custom link, you will be able to sneak in additional attributes as part of "custom" link definition. (Btw, the moment you define a custom link, it no longer is an org mode proper, but your own custom extension to it)

Roll your own custom link type, or see if there are existing link types that do what you want in NonGNU ELPA - org-contrib.

See the bottom of

(info "(org) External Links")

specifically the following link

(info "(org) Adding Hyperlink Types")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.