It can be very useful if you need to link to a page on another server, or if a page is accessed from multiple domain names. This way you do not need to update all your links, just the <base> of the document.
The attribute target= can be set to any of the following:
_blank to open in a new window
_self to open in the current frame
_parent to open in the frameset parent
_top to open in the whole browser window with no frames
Don't forget the underscore _ character, it must be included, and the letters must all be lower case.
<html>
<head>
<base href="http://www.southerntwilight.com/tutorials/">
<title>The Base Tag</title>
</head>
<body>
<p>
<a href="tutorial.html">The HTML Tutorials</a>
</p>
</body>
</html>
This example code would work with frames.
Your Frameset:
<html>
<head>
<title>A Frame Example:</title>
</head>
<framset rows="20%, *">
<frame src="something.html" name="top">
<frame src="main.html" name="mainframe">
</frameset>
</html>
Your Navigation Frame Page:
<html>
<head>
<base target="mainframe">
<title>The Base Tag</title>
</head>
<body>
<p>
<a href="page1.html">Page 1</a>
<a href="page2.html">Page 2</a>
<a href="page3.html">Page 3</a>
</p>
</body>
</html>
© Copyright 2001,2002 Southern Twilight All rights reserved.