Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator


HTML <base> Tag



HTML <base> tag is define a base URL for all the links with in a web page.

More Description: You have no need to write a full URL in everytimes. Define once base URL than after when you need write only sub directory path URL in a web page.

Always <base> tag is defined on head part of the HTML document. <base> tag is empty tag.


Example-Code:

<html>
<head>
<base href="http://www.way2tutorial.com/html/" target="_blank" />
</head>
<body>
<p>Learn about <a href="html.php">HTML Index</a></p>
</body>
</html>
Online Try This Code Your Self....   »

Example-Result:

Learn about HTML Index


<base> Tag Attributes

<base> tag supported following attributes.:

Attributes Value Description
href "URL" define a base URL link.
target _blank
_parent
_self
_top
Loads the linked document in new window.
Loads the linked document in the parent frame.
Loads the linked document in the same window.
Loads the linked document in the top up on same window.