Why is the target attribute (or rather its value) so strangely formatted?



I wonder why the HTML consortium chose to place an underscore (_) in front of the values. What is the logic behind this? Does it have some historic reason?

<a href="test.html" target="_blank">Link</a>


Maybe reading
= discussions / opinions =
found by google search
html target _blank site:stackoverflow.com


Thanks for your response, Leonhard.

The link tells me "Names starting with an underscore are reserved for special keywords." That doesn't quite answer my question, though. The Python interpreter, for instance, knows quite well that "def" is a special keyword without us placing an underscore in front of it. I'm sure there's more to it.


it is the specification by w3.org
6.2 SGML basic types
6.16 Frame target names


Unfortunately, the specification shares little on the original reasoning behind it.


Maybe this helps



It seems like there's little knowledge on the actual reasoning behind it: https://superuser.com/questions/707522/html-historical-or-technical-reason-for-target-blank-with-underscore.

Maybe it was introduced by some browser manufacturer who put little thought into it and that's why it hasn't be used anywhere else other than with target. Just my guess.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.