Basic hypertext links

Without the concept of links in and between documents, the HTML language (and now the XHTML language) would not have been invented. The need for markup to identify the source and target of a link preceded the need for other markup to structure and format the text around this markup.

Anchors

The Anchor element (A) is used to locate both the source and target ends of a hypertext link. When used as a target element, the Anchor element usually contains the title of the referenced text (in order that it may be highlighted on completion of a link to that item). The Name attribute provides a unique identifier for the element:

<p><a
						name="details">The Details</a> are
here. ...</p>

When used as a source element, the Anchor contains ...

Get XML Companion, The, Third 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.