Open this example in the interactive library
Source code
<div class="demo overflow-auto h-24 [&_#end]:scroll-mt-4">
<a href="#end">Jump to heading</a>
<p style="height: 8rem">Scrollable content</p>
<p id="end" style="min-height: 5rem">Target with top margin</p>
</div>