English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The target attribute specifies the default target for all hyperlinks and forms on the page. It can be used by each hyperlink/The form's target attribute can override this attribute.
Specify the default target for all hyperlinks and forms on the page:
<!DOCTYPE html> <html> <head> <title>HTML: <base> target attribute - Basic Tutorial Website oldtoolbag.com</title> <base target="_blank"> </head> <body> <p><a href="https://www.oldtoolbag.com">Basic Tutorial Website</a> - Please note that even without the target="_blank" attribute, the link will open in a new window. This is because the target attribute of the basic element is set to "_blank"./p> </body> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the target attribute.
Specify the default target for all hyperlinks and forms in the page using the target attribute.
By using each hyperlink/The form's target attribute can override this attribute.
HTML5Frames and framesets are no longer supported. Therefore, _parent, _top, and framename values are now mainly used for iframe.
<base target="_blank|_self|_parent|_top|framename">
Value | Description |
---|---|
_blank | Open the linked document in a new window. |
_self | Default. Open the linked document in the same frame. |
_parent | Open the linked document in the parent frame set. |
_top | Open the linked document in the entire window. |
framename | Open the linked document in the specified frame. |