the base URL for relative links


<base href="">

Browser
Internet Explorer Firefox Opera
Type
Empty

The BASE element specifies the base URL for relative links.

This element is placed inside the HEAD element.


<base href="http://www.tagindex.net/">


Attribute Value Explanation
href=" " URL the base location (absolute URL)

The target attribute can be used with the BASE element.

<base href="http://www.tagindex.net/" target="_blank">

Tips and Notes

The target attribute cannot be used with the Strict DTD.


Example

<html>
<head>
<title>TAG index</title>
<base href="http://www.tagindex.net/html/">
</head>
<body>

<ul>
<li><a href="../index.html">Top page</a> (http://www.tagindex.net/index.html)</li>
<li><a href="index.html">HTML Tags</a> (http://www.tagindex.net/html/index.html)</li>
<li><a href="link/base.html">Base tag</a> (http://www.tagindex.net/html/link/base.html)</li>
</ul>

</body>
</html>
Output