Hash Anchor Links


/ Published in: HTML
Save to your folder(s)

- Basically, place the div at the top of the page (or wherever you want the link to jump to).
- Then place the link somewhere on the page.
- This will cause the scroll to shift to the top of the div container with that ID attribute.


Copy this code and paste it in your HTML
  1. <div id="top">Some text.</div>
  2.  
  3. <a href="#top">Go to top of page</a>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.