<base> Syntax
Syntax Diagram for <base>
Open |
Parameter |
= |
Value |
Close |
<base |
href |
= |
"url" |
> |
target |
= |
"name" |
_blank |
<base> Description
- href
- "<href>" specifies the URL relative to which all other URLs
are defined. For example, you might refer to many URLs, all of which
start with
"http://www.mycom.com/Operations/Finance/1996/Q1/Actual"--but
this makes for a lot of typing. Or, you could define the base
href to be that long URL prefix, and then refer to files under that
directory by only their names; you need not include the entire URL at
every reference.
- target
- Specifies that all URLs are to be opened into the named frame (if
name was specified) or into a new, unnamed window (if
_blank was specified). For example, this
link should open this same page into a new window.
<base> belongs in the <head> section.
<base> Examples
If http://www.mycom.com/Operations/Finance/1996/Q1/Actual contains
three files, a.html, b.html, and c.html, you could
make references to them like this:
See a
or b
or c.
Or you could tag it this way:
...
...
See a or b
or c.
When you have dozens of absolute hrefs on a page, the savings can be
significant.
Last Modified: