A reader may need to open a reference while keeping a set of instructions nearby. An HTML link can open the destination in a new tab and leave the original page available.

The browser chooses whether to open the destination in a tab or a window. A short notice in the link text helps readers anticipate the switch.

A destination with a reference to its opener can navigate the original page away. The noopener link relationship keeps the browser from giving the destination that reference. You need a working local preview of the page in desktop Chrome.

  1. Open the HTML file or template that outputs the link in your text editor.

    The link in links.html points to a second page named reference.html in the same directory. The same edit applies when your existing link points to a full URL.

  2. Set the existing anchor's target to _blank and its rel to include noopener, preserving its link text, destination, and other attributes.
    <a href="reference.html"
       target="_blank"
       rel="noopener">
      Read the reference
      (opens in a new tab)
    </a>

    The href value still names the same destination, and the text in parentheses tells readers what to expect. The target value _blank asks for a separate tab or window. Current browsers imply noopener for _blank links unless opener is specified. Keeping noopener explicit makes the intended behavior visible in the source. In an existing rel value, noopener joins the other space-separated values and takes the place of opener if present.

  3. Save the edited HTML file.
  4. Open the saved page from your local site in desktop Chrome.
  5. Right-click the link on the page.
  6. Choose Inspect from the link's context menu.
  7. Verify that the selected anchor in Elements matches the opening tag you saved.

    The anchor should show your destination in href, target="_blank", and noopener in rel.

  8. Click the link normally in the page above or beside DevTools.
  9. Verify that the destination loads in a new tab beside the original page.

    Chrome should show the destination URL and its content in a new tab. In the example, Project reference loads and Project links stays open. If the destination replaces the original tab or shows an error page, the check failed.

Share this guide