Advertisement
Home Open Editor ❯

HTML <base> target Attribute

Example

<head>
  <base href="/html/" target="_blank">
</head>

<body>

<a href="smiley.png" >
  <img src="smiley.png" alt="smiley">
</a>

</body>

Try this code ❯

Meaning

The target attribute specifies the target window for a hypertext source link that references frames.

Note: _self is default value for all links.


Standard Syntax

<base target="_self|_blank|_parent|_top">


Advertisement

Attribute Values

Value Description
_self Opens the link in the same window as it was clicked by user (default)
_blank Opens the link in a new window or tab, but users can configure browsers to open a new window instead.
_parent Opens the link in the parent frame. If no parent, behaves as _self.
_top Opens the link in the full body of the window. If no ancestors, behaves as _self.
Home Open Editor ❯
Advertisement