How To Add A Hypertext Link With Scrolling To A Specific Point On That New Page?
I added a button on my HTML-Page, when clicking on it i get to a new URL (It's like a Hypertext Link 'behind' the button) and wanted to know how could I make it so, that the new op
Solution 1:
Add #id_of_the_element
you wish to link to to the end of the URI.
Solution 2:
I imagine this would work.
<a href="www.yoursite.com/newpage.html#id">Link</a>
Where ID is the ID of the element you want to scroll to.
Solution 3:
Just add an anchor to it and it should work. On your javascript change the location to
http://yourwebsite.com/yourpage#somesectionname
and in the page define the anchor as
<a id="somesectionname">Some Section</a>
Solution 4:
Use HTML anchor tag On your button put something like
<a href="http://example.com/filename.html#anchor">Link Text</a>
On the other page place <a name="anchor"></a>
around the element of the page that you want to jump to
Solution 5:
Just add the id of the element you wish to scroll to to the end of the URL.
For example Will's answer has an id of '#answer-16965883` so the URL is:
https://stackoverflow.com/questions/16965815/how-to-add-a-hypertext-link-with-scrolling-to-a-specific-point-on-that-new-page#answer-16965883
Post a Comment for "How To Add A Hypertext Link With Scrolling To A Specific Point On That New Page?"