Name
HREF — NN all IE all HTML 3.2
Synopsis
HREF=”URI"Required
The URI of the destination of a link associated with the area. In a
browser, when the URI is an HTML document, the document is loaded
into the current (default) or other window target (as defined by the
TARGET attribute). For some other file types, the
browser may load the destination content into a plugin or save the
destination file on the client machine. Because Navigator (through
Version 4) treats AREA elements as
A elements, the HREF attribute
must be defined in the AREA element for Navigator
scripts to access various properties about the URL and for event
handlers (such as onMouseOver) to work.
Example
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display">
Value
Any valid URI, including complete and relative URLs, anchors on the
same page (anchor names prefaced with the #
symbol), and the javascript: pseudo-URL in
scriptable browsers to trigger a script statement rather than
navigate to a destination.
Default
None.
Object Model Reference
- IE
[window.]document.links[i].href
[window.]document.all.elementID.href
- NN
[window.]document.links[i].href
In both browsers, other link object properties allow for the
extraction of components of the URL, such as protocol and hostname.
See the Link object in Chapter 9.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access