Navigate to an anchor on another page

Are you sure that you have placed the files in the same directory? I’ve tested the code that you have provided and it’s working. However, you could try this out (a different way of giving sections an id):

    <a id="section1">

If you have done this, just use the same way of linking:

<a href="different-page.html#section1">Section One</a>

Leave a Comment