How to create a link to jump to a specific part of a page in HTML?
To insert a link to a specific section of the same page, use the <a> tag with the href attribute. In href, you need to provide hash (#) symbol and section id where we need to jump.
Links on the same page also known as HTML bookmarks.
Example of links to the same page
Often, we see a link on the bottom of the page which says something like “Back to Top”. When we click on it, page scrolls to the top. Here is a similar example:
<div id="header-section">This is header section content</div>
<a href="#header-section">Jump to Top Header Section</a>
Learn more about the similar topics:
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |