How to Make a Link Open in a New Tab

How to Make a Link Open in a New Tab

Table of Contents

One small but significant aspect of enhancing user experience is configuring links to open in new tabs. This article explains the steps required to make a link open in a new tab, ensuring users have a smooth and intuitive browsing experience.

Why Open Links in a New Tab?

Opening links in a new tab keeps the original page accessible, which is particularly useful for reference or comparison purposes when navigating internal links.

It enables users to view more content without losing their initial place on your site, which can increase engagement and time spent on the page.

Additionally, for external links, opening a new tab ensures that your website remains open in the user’s browser, increasing the likelihood they will return.

How to Make a Link Open in a New Tab

Setting a link to open in a new tab is straightforward and involves simple HTML coding.

The HTML tag used to open a link in a new tab is target="_blank". It’s also important to add "rel="noopener noreferrer" which prevents unauthorized access to the origin page.

  1. Start with this HTML link template: <a href="" target="_blank">Click Here</a>
  2. Replace the URL and the anchor text with your desired values.

When to Open Links in a New Tab

While opening links in new tabs can improve user experience, it should be used judiciously to avoid overwhelming users with too many open tabs.

Here are some situations where it makes sense to use this feature:

  • External Links: When linking to another website, opening a new tab keeps your site accessible.
  • Documents: For PDFs or other documents, opening a new tab can prevent the user from losing their place on your website.
  • Complex References: When a link is used for reference purposes, such as citations or detailed explanations.


By implementing the target="_blank" attribute in your HTML links, you can enhance navigation on your website, improve user retention, and ensure that your content is as accessible and user-friendly as possible.

This small change can make a significant difference in how users interact with your site, leading to better engagement and satisfaction.