That's basic HTML, and way outside the scope of support issues.
The A anchor tag <a> can be linked from using the HREF property (it's hard not to learn that along the way), but it can also be linked to using the NAME (or, more recently, the ID) property. To link to a specific anchor on a page, you'd use something like:
http://www.example.com/pagename#anchorname
Both CSS and JavaScript can "know" what the target anchor (the fragment identified by the pound sign/hash at the end of the URL) is, and can show and hide things (or do other stuff) based on the fragment used. Without that, the browser's default behaviour is to scroll so that the named element (anchor) is as close to the top of the browser window as it can make it.