HTML and CSS Reference
In-Depth Information
comes a complete address for the document. Within the relative URL,
any component of the URL may be omitted. The browser automatically
fills in the missing pieces of the relative URL using corresponding ele-
ments of a base URL. This base URL is usually the URL of the document
containing the relative URL, but it may be another document specified
with the <base> tag, as we will discuss later in this chapter. [ <base>,
6.7.1 ] Relative schemes and servers
A common form of a relative URL is missing the scheme and server
name. Because many related documents are on the same server, it
makes sense to omit the scheme and server name from the relative
URL. For instance, assume the base document was last retrieved from
the server . This relative URL:
is equivalent to the absolute URL:
Table 6-2 shows how the base and relative URLs in this example are
combined to form an absolute URL.
Table 6-2. Forming an absolute URL
Protocol Server
Directory File
Base URL
http /
Search WWH ::

Custom Search