3

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

Manos Kardaris
  • 45
  • 1
  • 2
  • 8

2 Answers2

5

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.

peyo
  • 442
  • 3
  • 9
2

For this you'll need anchor links Like so:

<a href="#bottom">bottom section</a>

followed by an element at the bottom of your HTML page with the id="bottom"

billy.farroll
  • 1,903
  • 2
  • 15
  • 23