HTML base Tag

Example

Specify a default URL and a default target for all links on a page:
<head>
<base href="http://bloggerhelp24.blogspot.com/images/" target="_blank">
</head>

<body>
<img src="stickman.gif" width="24" height="39" alt="Stickman">
<a href="http://bloggerhelp24.blogspot.com">W3Schools</a>
</body>

Teach Yourself  by BH24 HTML Editor Tool!

The <base> tag is supported in all major browsers.

Definition and Usage

The <base> tag specifies the base URL/target for all relative URLs in a document.
There can be at maximum one <base> element in a document, and it must be inside the <head> element.

Tips and Notes

Tip: Put the <base> tag as the first element inside the <head> element, so that other elements in the head section uses the information from the <base> element.
Note: If the <base> tag is present, it must have either an href attribute or a target attribute, or both.