How to open a hyperlink in another window or tab in HTML ?
<a target="target_name" rel="relation_name" href="link">Link Name</a>
Here, the rel attribute is used to describe the relation between the current document and the linked document and the target attribute is used to specify the target link.
Example 1: This example opens a hyperlink in a new window or tab.
Explanation: Here, target=”_blank” is used to open a hyperlink in a new tab.
Example 2: Opening a hyperlink in a new window or tab using a security measure.
Explanation: Here, rel=”noopener noreferrer” is used as a security measure.
Example 3: Opening an image hyperlink in a new tab.