Web Tools Table Maker3schools TranslateImage CompressorFavicon Icon GeneratorCrop & Resize Image
Apu
Apu December 07, 2022 › #anchor #Button

Create a web page, when user clicks on the link it should go to the bottom of the page.

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 :

  1. An element with an id at the bottom of your page. E.g.
    <div id='bottom'>Div element</div>
  2. 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 »
save
listen
AI Answer
Write Your Answer
loading
back
View All