HTML <a> with target Attribute
HTML <a> with target Attribute
The target
attribute specifies where to open the linked document.
target="_self"
Opens the linked document in the same frame when a click event is triggered.
Example
The following example with iframe will give you a complete idea about target="_self".
Example
Attribute Values
Value | Description |
---|---|
_self | Default. Opens the linked document in the same frame when a click event is triggered. |
_blank | Opens the linked document in a new window. |
_parent | Opens the linked document in its parent frame. |
_top | Will breaks outside of all the frames it is nested and opens the linked document in the Entire or Complete window. |
target="_blank"
Opens the linked document in a new window.
Example
The following example with iframe will give you a complete idea about target="_blank".
Example
target="_parent"
Opens the linked document in its parent frame.
Example
The following example with iframe will give you a complete idea about target="_parent".
Example
target="_top"
Will breaks outside of all the frames it is nested and opens the linked document in the Entire or Complete window.
Example
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.