0

Sorry for the long title, I have no clue how to properly explain this in a efficient way as I dont know the terms for it. An example of what I want to do is done by stackoverflow itself. Take the most voted question in here, if I want to share a answer with you guys I can just use the url with the following https://stackoverflow.com/a/16184827/8782879 that would take the user to the specific area of the page.

I want to do something like this with my page, not necessary an answer but I would like to take them back to a certain point of the page once they re-visit that page. But as you all can see I dont know where to start looking for it as I dont even know the terms for this type of functions. Any help and tutorial on this would be very helpful to get me started.

I include the tags that I will possibly be using for this.

breq
  • 24,412
  • 26
  • 65
  • 106

1 Answers1

2

What are you looking for is called anchors and it is a HTML feature, not PHP. Just set id to a element like this

<div id="my-anchor">Your content here</div>

then use it like this http://localhost#my-anchor

Here you can see working example: http://www.tagindex.net/html/link/anchor_example1s.html#a001

breq
  • 24,412
  • 26
  • 65
  • 106
  • Thank you very much I will look into it. so hard when you dont know the name of what Im looking for there is nothing on google that could help me. –  Nov 13 '17 at 10:07