Latest

recent

HTML base target Attribute

Definition and Usage

The href attribute specifies the default frame/window in which to open all URLs (web resource) for a page.

Syntax

<base target="target" />

Syntax Example

<base target="_blank" />

Attribute Values

Value Description
_blank The target URL will open in a new window.
_self The target URL will open in the same frame as it was clicked.
_parent The target URL will open in the parent frameset.
_top The target URL will open in the full body of the window.
framename The name of the target frame the URL should open in.


Browser Support

The attribute is supported in all major browsers.

Tips and Notes

Note: The base element must be in <head>.

Example

<html>
<head>
<base href="http://www.1000sourcecodes.com/"
 target="_blank" />
</head>
<body>
<p>A relative URL: <a href="default.asp">
HTML Reference</a></p>
</body>
</html>
HTML base target Attribute Reviewed by 1000sourcecodes on 09:04 Rating: 5
Powered by Blogger.