Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Controls where links and forms open their results: same tab, new tab, parent frame, or a named browsing context.
The target attribute specifies where to display the result of a navigation: a link click or a form submission. It accepts keyword values for well-known browsing contexts or a custom name to open content in a specific window or frame.
Applies to: <a>, <area>, <form>, <base>
| Value | Where it opens |
|---|---|
_self | Same browsing context (the default) |
_blank | A new, unnamed browsing context (new tab or window) |
_parent | The parent browsing context. If no parent, behaves like _self. |
_top | The topmost browsing context. Breaks out of all nested frames. |
name | A named browsing context. Reuses it if already open; creates it otherwise. |
<!-- Default: opens in the same tab (target="_self" is implicit) --><a href="/about">About Us</a> <!-- Open in a new tab --><a href="https://example.com" target="_blank" rel="noopener noreferrer"> External Site</a> <!-- Form that opens results in a new tab --><form action="/search" target="_blank"> <input type="search" name="q" /> <button type="submit">Search in New Tab</button></form>
Historically, target="_blank" gave the opened page access to window.opener, allowing it to redirect your original tab to a phishing page. This required adding rel="noopener" as a countermeasure.
Modern browsers now imply rel="noopener" for all target="_blank" links by default. However, adding rel="noopener noreferrer" explicitly is still recommended for clarity and to support older browsers.
Any string that is not one of the underscore-prefixed keywords becomes a named browsing context. If a window or tab with that name already exists, the browser navigates it instead of opening a new one. This is useful for "preview" workflows.
<!-- Both links open in the same named window called "preview" --><a href="/draft/page-1" target="preview">Preview Page 1</a><a href="/draft/page-2" target="preview">Preview Page 2</a> <!-- If "preview" is already open, the browser reuses it --><!-- If not, it opens a new window/tab with that name -->
You can target a specific iframe by matching the target value to the iframe's name attribute. Links and forms outside the iframe can load content into it.
<!-- Parent page with an iframe --><iframe name="content-frame" src="/docs/intro" title="Content area"></iframe><nav> <!-- These links load inside the iframe --> <a href="/docs/chapter-1" target="content-frame">Chapter 1</a> <a href="/docs/chapter-2" target="content-frame">Chapter 2</a></nav>
Inside nested iframes, _parent navigates one level up and _top navigates the outermost window. These are essential for breaking out of frame hierarchies, such as redirecting to a login page from inside an embedded widget.
<!-- Inside a nested iframe: --> <!-- Navigate the immediate parent frame --><a href="/parent-page" target="_parent">Go to Parent</a> <!-- Navigate the outermost (top-level) window --><a href="/home" target="_top">Go to Home</a> <!-- Break out of all frames entirely --><a href="/login" target="_top">Log In</a>
The <base> element can set a default target for all links and forms on the page. Individual elements can still override it.
<!-- Set a default target for all links and forms on the page --><head> <base target="_blank" /></head> <body> <!-- These all open in new tabs (inheriting from <base>) --> <a href="https://example.com">Example</a> <a href="https://docs.example.com">Docs</a> <!-- Override the base target on a specific link --> <a href="/settings" target="_self">Settings (same tab)</a></body>
Opening links in new tabs (target="_blank") can disorient users, particularly those using screen readers or who have cognitive disabilities. The user loses their back-button history and may not realize a new tab opened.
_blank when there is a clear reason (external site, in-progress form would be lost).aria-describedby pointing to a hint.<base target="_blank"> unless the application context demands it (e.g. a link aggregator).target="_blank" without a user gesture (e.g. triggered by JavaScript timers) may be blocked by popup blockers.sandbox attribute can block _top and _parent navigation unless allow-top-navigation is granted._blank opens a new tab rather than a new window. Named targets may not behave consistently across mobile browsers.