Relationships
Very few documents stand alone. Instead, a document is usually part of a collection of documents, each connected by one or several of the hypertext strands we describe in this chapter. One document may be a part of several collections, linking to some documents and being linked to by others. Readers move among the document families as they follow the links that interest them.
When you link two documents, you establish an explicit
relationship between them. Conscientious authors use the rel
attribute of the <a>
tag to indicate the nature of the
link. In addition, two other tags may be used within a document to
further clarify the location of a document within a document family and
its relationship to the other documents in that family. These tags,
<base>
and <link>
, are placed within the body of
the <head>
tag. [<head>, 3.7.1]
The <base> Header Element
As we previously explained, URLs within a document can be either
absolute (with every element of the URL explicitly provided by the
author) or relative (with certain elements of the URL omitted and
supplied by the browser). Normally, the browser fills in the blanks of
a relative URL by drawing the missing pieces from the URL of the
current document. You can change that with the <base>
tag.
The <base>
tag should appear only in the document ...
Get HTML & XHTML: The Definitive Guide, 6th 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.