Content · Web Development · HTML

HTML Opening New Tabs and Announcing New Context

Opening a new tab changes the visitor's browsing context and can feel unexpected. When doing it for a real reason, say so in nearby text or the link label.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

Opening a new tab changes the visitor's browsing context and can feel unexpected. When doing it for a real reason, say so in nearby text or the link label. The important question is always where the link leads and whether the person reading the page can predict it.

What You Need to Know


Target="_blank" requests a new browsing context. Noopener is a sensible safety measure, and users should still be able to choose their own tab behavior.

Links are the pathways through a website. The words on a link should help someone choose where to go before clicking it.

Example: See It in Action


Here is a simple example to experiment with. Type it, save the file, and check what the browser displays.

This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.

<p>
    <a href="certificate.pdf" target="_blank" rel="noopener">
        View the certificate (opens in a new tab)
    </a>
</p>

Let’s Understand the Example


  • An a element becomes a working link when it has an href. Its visible text should tell readers where they will go.
  • A p groups a paragraph of related text. Start another paragraph for a new thought.
  • Href contains the destination of a link. A value starting with # points to an id on the same page.
  • Target chooses the browsing context where a link opens. Blank usually opens a new tab.
  • Rel describes a relationship to the linked page or resource, including security and search hints.

The first example link points to certificate.pdf. Check whether that destination exists relative to the document. A link changes where readers go; it does not perform an action such as saving a form.

What Should You See?


You should see a link named “View the certificate (opens in a new tab)”. Selecting it leads to certificate.pdf when that destination exists. Try it with the mouse and the keyboard.

Imagine this link is read out of context. Would its text still explain the destination? Rename unclear links before trying to make them look nicer with CSS.

Try It Yourself


  1. Rewrite a new-tab link so its label warns the reader clearly.
  2. Save your changes, open or refresh the page, and compare the result with the original example.
  3. Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.

Common Beginner Mistakes


  • Forcing a new tab for every link on the same site.
  • Avoid dead links, empty href values and clickable-looking text without a real destination.

Key Takeaways


  • Opening a new tab changes the visitor's browsing context and can feel unexpected.
  • An a element becomes a working link when it has an href. Its visible text should tell readers where they will go.
  • Target="_blank" requests a new browsing context. Noopener is a sensible safety measure, and users should still be able to choose their own tab behavior.
Share this resourceSend this page to someone who may find it useful.