I want to create a simple HTML TOC inside Obsidian, but when I click on the first element it doesn’t go to the h2 heading, instead it asks me if I want to open an external link.
<a href="#First_Point_Header">1 First Point Header</a>
<h2 id="First_Point_Header">First Point Header</h2>
Huh, weird. Does the same thing happen when you try it in the sandbox vault?
I tried your example on iOS. When I tap the link in Live Preview it just shows the code for editing. When I tap it in Reading View nothing happens. There might be a bug, or Obsidian might not support it. Maybe search the forum for something like HTML fragment links
Markdown works:
- [[#First Point]]
- [1 First Point](#First%20Point)
## First Point
OK. If the Markdown doesn’t work in them then I expect the HTML won’t, either (but try it to be sure). I avoid PDFs as much as possible, so I can’t offer much help. I would have expected both the Markdown and the HTML to work in exported PDFs.