Chapter 66. Using Named Anchors


The anchor tag is unusual in that it has two different functions in HTML. On one hand, you can use the anchor tag to link to another page:

 <a href="anotherpage.htm">Go to another page</a> 

GEEKSPEAK

A named anchor is a location on a Web page to which you can link.


On the other hand, you can use the anchor tag to set a location or named anchor to which to link:

 <a name="linkhere"></a> 

GEEKSPEAK

The source of a link is the element that the visitor clicks to go to another page. The destination of the link is the page that loads in the browser window.


The way the anchor tag functions depends on its attributes. When the anchor tag contains the href attribute, it functions as the source of a link, or the element that the visitor clicks to go to another page. But when the anchor tag contains the name attribute, it functions as the destination of a link, or a location that appears in the browser after the visitor clicks the link.



Web Design Garage
Web Design Garage
ISBN: 0131481991
EAN: 2147483647
Year: 2006
Pages: 202
Authors: Marc Campbell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net