Get the latest tech news

Why does target="_blank" have an underscore in front? (2024)


Ever wondered why you need the underscore in target="_blank" to open a link in a new tab?

Before HTML5, developers used<frameset> for SPA-like functionality, dividing the window into multiple frames, each with its own unique ID. But if no such frame existed, the browser would create a new tab and assign it the “blank” name. It’s simple - developers needed a way to explicitly tell the browser to open the link in a new tab, free of frame semantics.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Underscore

Underscore

Photo of target= _blank

target= _blank

Related news:

News photo

My computer has an underscore in its name, and I have trouble with the network

News photo

Underscore’s Lily Lyman will break down venture relationships at TechCrunch Early Stage 2024