How can I insert a link on a page to go directly to the main page?

I've created a website and would like to be able to navigate to the end of the page with the click of a button. How can I do this? Can someone help me?

(2 votes)
Loading...

Similar Posts

Subscribe
Notify of
9 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
whgoffline
1 year ago

Well, a simple idea would be to place an empty div element at the bottom a div with id=”bottom” and then simply insert the following link. Alternatively, you can also set a link to an existing element at the bottom of the page.

See the following demo: https://jsfiddle.net/gtardcpv/

I have only scroll-behavior at the demo: smooth; supplemented so that the page scrolls slowly down instead of jumping directly down.

Unten

NackterGerd
1 year ago
Reply to  whgoffline

This is not really a good idea with the dummy link without content

https://www.w3schools.com/html/tryit.asp?filename=tryhtml_links_bookmark

Actually, it is simply made with an ID without an empty link

whgoffline
1 year ago
Reply to  NackterGerd

Thank you, have changed this quickly to an empty div with id.

NackterGerd
1 year ago

Very good

Definition and Usage

The name attribute is not supported in HTML5. Use the id attribute instead.

Would only work on older HTML version

I even knew only ID as I have always done it

However, you should always be sparingly dealing with it, as Google links with parameters find more re-evaluating

SadDad
1 year ago

Now

Blablabla

Page end

Addendum: You can also leave this page.html as long as you stay on the same page. But it was also possible to link to a jump mark on another side.

Tilo2300
1 year ago

You insert an anchor at the end of the page:

 hier ist unten

You can leave the "here is down" of course. The anchor is then not visible.

At the top end of the page you will then insert a normal link, just not to another side, but to this anchor:

 gehe nach unten

Watch the #.

sonderdings
1 year ago

I just wanted to explain it, but then I saw that it is already described very comprehensively in Wikipedia:

https://de.wikipedia.org/wiki/Anker_(HTML)

HarryXXX
1 year ago

https://wiki.selfhtml.org/wiki/HTML/Tutorials/Links

That should be enough as an explanation.

NackterGerd
1 year ago

https://www.w3schools.com/html/tryit.asp?filename=tryhtml_links_bookmark

To set a jump mark ID

Then in the link specify the #StrungmarkeID as link