Version: 2.0, 3.2, 4.0
Compability: Explorer 4, 5 Netscape 4, 6
The <base> tag is used to define the base URL for the HTML document. This allows the use of relative URL addresses elsewhere in the document. Interestingly, this base URL does not have to be an absolute URL, but rather, it can be a relative URL.
Also, when a browser arrives from another site to your site via a link, you can use the target attribute of this tag to ensure that your site does not appear inside a frame or window of the previous site. In other words, your site will always appear as the top window.
The base tag must be placed between the opening and closing head tags.
There is no closing tag.
<head>
<base href="http://www.devguru.com/">
</head>
<body>
<a href="./technologies/HTML/quikref/html_index.html">HTML Index</a>
In this example, the link in the body resolves to: http://www.devguru.com/technologies/HTML/quikref/html_index.html.
<head>
<base target="_top">
</head>
This code directs that your site always appears as the top window.