Base target attribute
Base Object
Definition and Usage
The target attribute sets or returns the value of the target attribute in the base element.
The target attribute specifies where to open all links in the page.
Syntax
baseObject.target=
value
The target attribute can be one of the following values:
| Value | Description |
|---|---|
| _blank | Open the link in a new window |
| _self | Open the link in the same frame (default). |
| _parent | Open the link in the parent frame |
| _top | Open the link in the window document. |
| framename | Open the link in a specified frame |
Browser support





All major browsers support the target property.
Example
Example
Return the target attribute of the base link for all links in the page:
Base link for all links:
The example above produces the following output:
Base link for all links: _blank
Try it »
Base Object