After loading a page, a browser automatically scrolls to the element identified by its id in the fragment part of the URL. It does the same when you click on an anchor with an href of the kind #element-id.

When you load a page using the URL it should automatically scroll the element with the id header into the view. Note that recently, chromium-based browsers support text fragments to highlight a part of the page. The URL looks like

The second behavior is when you click on a link which only set the fragment, the browser should navigate to the element:

<a href="#header">#example</a>

#blazor core #web

Anchor navigation in a Blazor application
11.80 GEEK