This doesn't work:
<a href="#answer">What's in the box?</a>
<details>
<summary>The box</summary>
<div id="answer">A lovely surprise!</div>
</details>
Clicking on the link doesn't navigate to the ID because it isn't visible until the details element is opened.
I'm sure it could work using JS - but is there a plain #HTML way to do this?