target Attribute
The target
attribute determines where the linked content will be displayed. Common values for the target
attribute are:
_blank html
: Opens the linked document in a new browser window or tab._self
: Opens the linked document in the same frame or window._parent
: Opens the linked document in the parent frame._top
: Opens the linked document in the full body of the window.
Syntax:
<a href="https://www.w3wiki.nethttps://www.example.com" target="_blank">Visit Example Website</a>
How to use the target attribute and the rel attribute in the Tag ?
The target
and rel
attributes in the <a>
(anchor) tag is used to control the behaviour of hyperlinks, specifying how the linked content should be opened and establishing relationships between the current and linked documents. Here’s how to use these attributes: