You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you put a link within a heading, the resulting HTML works but is invalid because the anchor elements get nested.
For example, with the example-report.md from npx @observablehq/framework@latest create:
---title: Example report---# A brief history of [space exploration](https://example.com/)
This report is a brief overview of the history and current state of rocket launches and space exploration.
...
Generates:
<mainid="observablehq-main" class="observablehq"><h1id="a-brief-history-of-space-exploration" tabindex="-1"><aclass="observablehq-header-anchor"
href="#a-brief-history-of-space-exploration">A brief history of <ahref="https://example.com/" target="_blank"
rel="noopener noreferrer">space exploration</a></a></h1><p>This report is a brief overview of the history and current state of rocket launches and space exploration.</p>
Which browsers or the W3C validator will show as having structural errors:
Error: Start tag a seen but an element of the same type was already open.
From line 112, column 163; to line 112, column 235
istory of <a href="https://example.com/" target="_blank" rel="noopener noreferrer">space
Error: Stray end tag a.
From line 112, column 257; to line 112, column 260
ration</a></a></h1>↩
The text was updated successfully, but these errors were encountered:
If you put a link within a heading, the resulting HTML works but is invalid because the anchor elements get nested.
For example, with the
example-report.md
fromnpx @observablehq/framework@latest create
:Generates:
Which browsers or the W3C validator will show as having structural errors:

The text was updated successfully, but these errors were encountered: