1. Controlling Where Links Open: The target Attribute
By default, clicking an anchor tag opens the destination URL in the current browser tab. You can customize this behavior using the target attribute:
| Value | Behavior |
|---|---|
_self |
Default. Opens the link in the same window/tab. |
_blank |
Opens the link in a brand new browser tab or window. |
_parent |
Opens the link in the parent frame. |
_top |
Opens the link in the full body of the current window, escaping iframes. |
2. Security Best Practice: rel="noopener noreferrer"
Whenever opening links in a new tab with target="_blank", always add rel="noopener noreferrer". Without this, the newly opened window gets access to the originating window's window.opener JavaScript object, which malicious third-party websites can exploit for phishing attacks (reverse tabnabbing).
Visit Official NTA Portal
3. Downloadable Files with the download Attribute
To prompt the browser to download a file (such as a syllabus PDF or question paper) rather than navigating to it, add the download attribute:
Download Syllabus (PDF)
4. Email and Telephone Links
Email Support
Call Helpline (+91 8118802068)