Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML link for bottom and top page [duplicate]

Tags:

html

I want to put a link in my page which will take me to the bottom of the page and a link which will take me to the top of my page, and also to some section of the page. How can I put a link to my page that will not redirect me to another website but to the top/bottom of the page or a section?

Thanks

like image 783
Manos Kardaris Avatar asked Oct 17 '25 15:10

Manos Kardaris


1 Answers

you need to use a html anchor.

For example, at the top of your page (actually where you want to point to), one of the html element has the id top.

<div id="top"> ...</div>

If you put a link such as:

<a href="#top">go to the top</a>

...on click the browser will point to the div with id top.
It goes the same way for any part of your page.

like image 75
peyo Avatar answered Oct 20 '25 04:10

peyo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!