Use target="_blank" when a link intentionally needs to open in a new browsing context. Do not make every link open a new tab; unexpected new tabs can disrupt navigation and accessibility.
<a href="https://example.com/" target="_blank" rel="noopener">Open example in a new tab</a>
_self: current browsing context, the normal default._blank: a new browsing context._parent and _top: mainly relevant to embedded/frame contexts.Modern browsers generally protect target="_blank" links from controlling the opener, but explicitly adding rel="noopener" makes the intention clear and is safe for compatibility.
A custom target name such as target="reports" can reuse the same named tab/window instead of opening a new one on every click. Use this only when the behavior is intentional and understandable.
If opening a new tab is important or unexpected, indicate it in the link text or accessible label. Normal site navigation is usually best left in the current tab.
HTML hyperlinks Links within a page
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.
| kol | 23-01-2012 |
| its really good | |