> developers needed a way to explicitly tell the browser to open the link in a new tab, free of frame semantics First, it doesn't say why an underscore does that, because you could totally have underscores in frame names. My guess as others here is that the underscore prefix dates back from reserved names in C and C++. IIRC the reserved names also included "_self" (even if it was the default), "_parent" (to go up a l…
Why does target="_blank" have an underscore in front? (2024)
51–60 of 203 posts
Re: Why does target="_blank" have an underscore in front? (2024)
#52Re: Why does target="_blank" have an underscore in front? (2024)
#53I think it's funny that Mozilla says not to use frames anymore, they work just fine on modern browsers...
You mean [the mdn docs]( https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fr... )? Looks like classic deprecation to me: they'll still 'work', you just shouldn't use them. In the same way that tables-for-layout still 'works', but you shouldn't actually do that.
They solved a real problem of having parts of the page that changes and other parts that didn’t. It’s a shame they were deprecated without a modern replacement.
An "include" mechanism (like what html provides) should have been proposed to replace this use case.
The deprecation of frames forced dynamic websites (wether it is client or server side) on everyone and i feel like it is in part responsible of why people stopped to handcraft websites.
Re: Why does target="_blank" have an underscore in front? (2024)
#54Re: Why does target="_blank" have an underscore in front? (2024)
#55FWIW, I never heard of the frameset tag, while I did use frames back then.
Re: Why does target="_blank" have an underscore in front? (2024)
#56Re: Why does target="_blank" have an underscore in front? (2024)
#57Earlier quoted context omitted.
You mean [the mdn docs]( https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fr... )? Looks like classic deprecation to me: they'll still 'work', you just shouldn't use them. In the same way that tables-for-layout still 'works', but you shouldn't actually do that.
Actually, frames were ugly, limited and not really ergonomic but they weren’t a wrong pattern. They solved a real problem of having parts of the page that changes and other parts that didn’t. It’s a shame they were deprecated without a modern replacement. An "include" mechanism (like what html provides) should have been proposed to replace this use case. The deprecation of frames forced dynamic websites (wether it is…
Isn't iframe the replacement? iframe is not deprecated.
Re: Why does target="_blank" have an underscore in front? (2024)
#58The answer is a little unsatisfying to me. It says that "blank" ca be a frame name, but doesn't say why "_blank" can't be.
Re: Why does target="_blank" have an underscore in front? (2024)
#59Shower thought: ` ` should transfer a link in a desktop into my phone. Same goes for `target="_desktop"` but in the opposite direction.
Re: Why does target="_blank" have an underscore in front? (2024)
#60Earlier quoted context omitted.
Yeah it’s not a great explanation. To me (and I’m of the era they’re describing so I used it a lot) it’s simply that _blank is a reserved keyword that means open the link in a new, unnamed window. Other reserved keywords for “target” are _self (default value), _parent, and _top. https://www.w3schools.com/TAgs/att_a_target.asp
But why was _name the naming syntax for reserved keywords, specifically?