Hyperlink Elements

The capability of linking Web resources is what makes the Web so fascinating. By following links, you can be looking up job opportunities one moment and then be reading up on the latest mixed drink recipes the next! Linking between documents is accomplished with the one simple element described in this section.

<a>

Type:

Container

Function:

The <a> element can do one of two things, depending on which attributes you use. Used with the href attribute, the <a> element sets up a hyperlink from whatever content is found within the <a> element and the document at the URL specified by href (see Figure 3.13). When you use the <a> element with the name attribute, you set up a named anchor within a document that can be targeted by other ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 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.