Link to a specific section of your web page – HTML


To view this and the other 250+ tutorials on Simple Dev, sign up for a 10-day free trial.


To create a link to a specific section of your web page, use an anchor element with the href attribute and use the ID of another element on the page as the value (prefixed with a hash sign):

<a href="#last-section">Link text</a>

<!-- Other HTML code might be here -->

<h2 id="last-section">Header</h2>


Link to specific section demo


The Anchor element on MDN

Lesson tags: Open Lesson
Back to: HTML Course > HTML Links