Tag: <base>

<base> Syntax

Syntax Diagram for <base>
Open Parameter = Value Close
<base href = "url" >
target = "name"

<base> Description

"<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 ""--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.
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 contains three files, a.html, b.html, and c.html, you could make references to them like this: See <a href= "">a</a> or <a href= "">b</a> or <a href= "">c</a>. Or you could tag it this way: <html> <head> ... <base href=""> </head> <body> ... See <a href="a.html">a</a> or <a href="b.html">b</a> or <a href="c.html">c</a>. When you have dozens of absolute hrefs on a page, the savings can be significant.
Last Modified: