Chapter 19Links, Anchors, and Image Maps

Defining a Link

A link is basically a piece of HTML code that allows you to redirect the browser to a different resource on the Internet. That redirection can be to another page on your site, a different site entirely, an e-mail address, or even an FTP address for file download. Here is the general HTML syntax:

<A HREF="locationOrURL"   [NAME="anchorName"]   [TARGET="windowName"]>   linkText</A>

The HREF attribute defines the document or anchor to which you are linking. HREF literally stands for HyperText Reference. The NAME attribute specifies a tag that becomes an available hypertext target within the current document. If this attribute is present, the link object is also an anchor object. The TARGET attribute ...

Get Advanced Javascript, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.