Html – How to redirect to a particular section of a page in html


I am done with redirection to target page but what I want is to redirect to particular <div> of the page. How can this be achieved?

Best Solution

You can do it in two ways.

1) [via Javascript (+jQuery)]

<a href="#" id="home">home</a>

$(document).scrollTop(100) // any value you need

2) [via pure HTML]

<a href="#home_section">home</a>

<section id="home_section"></section>