Allow [[Internal Links]] inside html tags

Use case or problem

Allow [[Internal Links]] inside html tags.

Links are not interpreted by obsidian.

Proposed solution

Example 1 :


Example 2 :

<summary>Click here to view details</summary>
<li>[[Internal link 1]]</li>
<li>[[Internal link 2]]</li>
1 Like

Sorry, this is not possible.


As a workaround, could you explain the kind of URL required so that we could use <a href="..."> links within the HTML?

Markdown’s table support sucks rocks, quite frankly. For certain use cases, we find we have to use HTML tags to get the kinds of tables we need – even for stupid simple stuff, like having the headers in the first column instead of the first row.

If markdown links within HTML tags is impossible to support, how would we format the href value in standard HTML <a> tags to replicate the functionality of bog-standard [[markdown links]]?

From here:

<a href="" class="internal-link">Title</a>

I’m using Dataview to parse it for me into the correct format.

Given a string of [[Some file]], here’s the Dataview code to generate a working link:

page =

link = `<a href="${page.file.path}" class="internal-link">${}</a>`

Following works for me. (Obsidian Version: 1.0.3)

<a href="my" class="internal-link">my file</a>

Just the full file name (full path not required).

Same technique works for linking the blocks as well.

<a href="my^block1" class="internal-link">block name</a>

Above is based on original reply from @AlanG .Thanks mate :slight_smile:


Have you tried html <span> tags?

I use the following to right align some text (page links)

   <p style="text-align: right">
      some text with [[links]] and ~~formatting~~

Which correctly produced right aligned text which I use for backlinks at the bottom of the page.

I doesn’t work in editing mode, but definitely works in reading mode.

some text with [[links]] and formatting

To add some investigation:

You can do this in callouts (introduced after OP?), admonitions, also embedding.

Importantly, filename change propagation works in callouts/embedding and even within the span that the OP shows which breaks the link. It doesn’t work for admonitions unfortunately (I find the code-block like syntax more useful than the callout indentation syntax).


><span>[[internal link]]</span>


<span>not gonna render here: [[internal link]]</span>

but it will render here: ![[parent file#^cats]]

Not sure of the OPs use case, but this doesn’t satisfy mine :frowning: