Why Do You Need the Underscore in target="_blank"?

Pratik Patel

  1. Feb 25, 2025
  2. 4 min read

If you've ever used target="_blank" in HTML, you know it opens a link in a new tab or window. But have you ever wondered why the underscore is needed? Let’s break it down.

The Target Attribute Explained

The target attribute in an <a> tag specifies where to open the linked document. Here are its main values:

  • _blank: Opens the link in a new window or tab.
  • _self: Opens the link in the same frame (default).
  • _parent: Opens the link in the parent frame.
  • _top: Opens the link in the full body of the window.
  • <framename>: Opens the link in a named frame.

A Bit of History: Frames and Naming

Before HTML5, developers used <frameset> tags to divide a browser window into multiple frames. Each frame had a unique ID, like id="sidebar" or id="content". The target attribute allowed links in one frame to load content into another frame:

<a href="/pricing" target="content"></a>

Here, clicking the link would load the /pricing page in the frame named "content."

Now, if you used:

<a href="/" target="blank"></a>

The browser would look for a frame named "blank." If none existed, it would open a new tab and assign it the name "blank." Clicking the same link again would reuse that tab because the browser had already named it.

Why the Underscore?

The underscore (_) was introduced to differentiate special values from user-defined frame names. For example, _blank explicitly tells the browser to open a new tab every time, without reusing an existing one. Similarly, _self, _parent, and _top are reserved keywords, each serving a specific purpose.

Modern Best Practices

Since <frameset> is deprecated in HTML5, there’s usually no need to name frames. Instead, use _blank for opening new tabs. Just remember to include rel="noopener noreferrer" for security and performance reasons:

<a href="https://example.com" target="_blank" rel="noopener noreferrer">Visit Example</a>

This prevents the new tab from accessing the window.opener object of the original page, safeguarding against potential security vulnerabilities.

Conclusion

The underscore in target="_blank" exists to distinguish built-in behaviors from custom frame names. Although frames are mostly a thing of the past, this convention remains essential for maintaining compatibility and ensuring predictable browser behavior.

P.S. Don’t use <frameset>—it's deprecated in HTML5.

About Author
Pratik Patel

See What Our Clients Say

Mindgap

Incentius has been a fantastic partner for us. Their strong expertise in technology helped deliver some complex solutions for our customers within challenging timelines. Specific call out to Sujeet and his team who developed custom sales analytics dashboards in SFDC for a SoCal based healthcare diagnostics client of ours. Their professionalism, expertise, and flexibility to adjust to client needs were greatly appreciated. MindGap is excited to continue to work with Incentius and add value to our customers.

Samik Banerjee

Founder & CEO

World at Work

Having worked so closely for half a year on our website project, I wanted to thank Incentius for all your fantastic work and efforts that helped us deliver a truly valuable experience to our WorldatWork members. I am in awe of the skills, passion, patience, and above all, the ownership that you brought to this project every day! I do not say this lightly, but we would not have been able to deliver a flawless product, but for you. I am sure you'll help many organizations and projects as your skills and professionalism are truly amazing.

Shantanu Bayaskar

Senior Project Manager

Gogla

It was a pleasure working with Incentius to build a data collection platform for the off-grid solar sector in India. It is rare to find a team with a combination of good understanding of business as well as great technological know-how. Incentius team has this perfect combination, especially their technical expertise is much appreciated. We had a fantastic time working with their expert team, especially with Amit.

Viraj gada

Gogla

Humblx

Choosing Incentius to work with is one of the decisions we are extremely happy with. It's been a pleasure working with their team. They have been tremendously helpful and efficient through the intense development cycle that we went through recently. The team at Incentius is truly agile and open to a discussion in regards to making tweaks and adding features that may add value to the overall solution. We found them willing to go the extra mile for us and it felt like working with someone who rooted for us to win.

Samir Dayal Singh

CEO Humblx

Transportation & Logistics Consulting Organization

Incentius is very flexible and accommodating to our specific needs as an organization. In a world where approaches and strategies are constantly changing, it is invaluable to have an outsourcer who is able to adjust quickly to shifts in the business environment.

Transportation & Logistics Consulting Organization

Consultant

Mudraksh & McShaw

Incentius was instrumental in bringing the visualization aspect into our investment and trading business. They helped us organize our trading algorithms processing framework, review our backtests and analyze results in an efficient, visual manner.

Priyank Dutt Dwivedi

Mudraksh & McShaw Advisory

Leading Healthcare Consulting Organization

The Incentius resource was highly motivated and developed a complex forecasting model with minimal supervision. He was thorough with quality checks and kept on top of multiple changes.

Leading Healthcare Consulting Organization

Sr. Principal

US Fortune 100 Telecommunications Company

The Incentius resource was highly motivated and developed a complex forecasting model with minimal supervision. He was thorough with quality checks and kept on top of multiple changes.

Incentive Compensation

Sr. Director

Most Read
Snowflake: A Game-Changer in Cloud Data Warehousing

Snowflake’s cloud data warehousing platform is transforming how businesses manage and analyze their data. With its powerful combination of scalability, efficiency, and affordability, Snowflake empowers organizations to handle large datasets seamlessly. Whether you're working with terabytes or petabytes of data, Snowflake ensures high-performance data processing and analytics, unlocking the full potential of your data.

Vinay Chaudhari

  1. Nov 21, 2024
  2. 4 min read
Building a Simple E-Invoicing Solution with AWS Lambda and Flask

In today’s fast-moving distribution industry, efficiency is everything. Distributors need quick, reliable tools to handle tasks like generating invoices and e-way bills. That’s why we created a serverless e-invoicing solution using AWS Lambda and Flask—keeping things simple, cost-effective, and secure. Here’s how we did it and the benefits it brought to distributors.

Yash Pukale

  1. Nov 13, 2024
  2. 4 min read
Scaling Data Analytics with ClickHouse

In the modern data-driven world, businesses are generating vast amounts of data every second, ranging from web traffic, IoT device telemetry, to transaction logs. Handling this data efficiently and extracting meaningful insights from it is crucial. Traditional databases, often designed for transactional workloads, struggle to manage this sheer volume and complexity of analytical queries.

Kartik Puri

  1. Nov 07, 2024
  2. 4 min read
From Pandas to ClickHouse: The Evolution of Our Data Analytics Journey

At Incentius, data has always been at the heart of what we do. We’ve built our business around providing insightful, data-driven solutions to our clients. Over the years, as we scaled our operations, our reliance on tools like Pandas helped us manage and analyze data effectively—until it didn’t.

The turning point came when our data grew faster than our infrastructure could handle. What was once a seamless process started showing cracks. It became clear that the tool we had relied on so heavily for data manipulation—Pandas—was struggling to keep pace. And that’s when the idea of shifting to ClickHouse began to take root.

But this wasn’t just about switching from one tool to another; it was the story of a fundamental transformation in how we approached data analytics at scale.

Chetan Patel

  1. Oct 28, 2024
  2. 4 min read