Anchors
In an earlier tutorial we looked at how to use the <a> container to link to a different web page. Well this particular container has a second use - to provide an anchor point in a web page that can be linked to.
The way that you code an anchor point is very simple as you just need to give the anchor an id so that you have a way to reference it.
Because of the dual use of the <a> container some browsers get confused if you try to make the anchor a self closing tag so using a separate closing tag immediately after the open tag is the best way to code this for compatibility with the most browsers.
Once we have an anchor point defined we can now place links elsewhere on that page or on other pages that link to that anchor point. The only difference between a link to an anchor point and an ordinary page link is what goes in the href attribute. Here is a link from elsewhere on the same page:
To link from a different page you just need to add the anchor reference to the end of the href that refers to the page (eg. href="next.htm#myanchor").


