The target attribute

target specifies where to open a link or a form submission result — the current tab, a new tab, or a specific frame.

Applies to

a, form, base

Values

"_self" (default, current tab), "_blank" (new tab), "_parent", "_top", or a specific frame name.

Example

<a href="https://example.com" target="_blank" rel="noopener">External link</a>

Edge cases

  • target="_blank" without rel="noopener" gives the new page access to the current window.opener — a real risk, always pair it with noopener.
  • Overusing _blank hurts UX (tab clutter) — use it deliberately, not on every link.

Accessibility

  • Opening in a new tab without warning can disorient screen reader users — state it explicitly in the link text when it matters.

Security

  • rel="noopener" (or noreferrer) is required alongside target="_blank" for external links, to prevent reverse tabnabbing.

Related tools