Last updated: August 27, 2026.
The target attribute chooses where a link opens. Use a standard keyword or the name of an iframe.
Links
<a href="details.html">Open here</a>
<a href="report.html" target="_blank" rel="noopener">Open in a new tab</a>Named iframe
<nav>
<a href="overview.html" target="preview">Overview</a>
<a href="examples.html" target="preview">Examples</a>
</nav>
<iframe name="preview" title="Article preview" src="overview.html"></iframe>Give every iframe a useful title and avoid JavaScript URLs. See MDN’s link element reference.