MDN self-hosted library · e01.org

Window: name property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<a href="url2" target="other-tab">This link will be opened in the other tab.</a>
js
// Open a tab with a specific browsing context name
const otherTab = window.open("url1", "_blank");
if (otherTab) otherTab.name = "other-tab";