You should use an anchor element and you know the anchor element is used to link one website to another website.
You can also move to a different area on the same page using the anchor element.
To go to the bottom of a page, you need to add :
- An element with an id at the bottom of your page. E.g.
<div id='bottom'>Div element</div>
- An anchor element with its href attribute at the top of your web page.
<a href="#bottom">Go to bottom</a>
So finally, whenever you click on the link you may go to the bottom of the web page.
<a href="#bottom">Go to bottom</a> <div style="height:500px"> Main contain with some gap. </div> <div id='bottom'>Div element</div>Try it Yourself »
Comments (0)