Why the underscore in (target="_blank")

EnricTellez

New member
Joined
Dec 19, 2016
Messages
27
Points
0
Whenever I inspect a link on a website that has "target blank" it has this (_) underscore in it as well. Why is this?
I've noticed that it also works if you don't put it in there, so why is it there?

Thanks in advance for the answers!!!
 

skullofskill

Member
Joined
Nov 16, 2016
Messages
39
Points
8
Hi there EnricTellez, The underscore is to certify that the correct "target" name is being used, since there are four values (_blank, _top, _self, and _top) to choose from.
If you use target="_blank", be sure to add rel="noopener noreferrer" to avoid phishing attacks. It's so under used that I actually need to fix a lot on my own sites. :chair:


Basically, the conflict happens because 'frame' can use the name 'blank', and the 'target' value can be the name of a 'frame'. The underscore is what is used to disambiguate the two values to have no conflicts.
 
Newer threads
Replies
7
Views
3,253
Replies
3
Views
3,636
Replies
6
Views
2,558
Replies
3
Views
2,187
Latest threads
Replies
4
Views
559
Replies
0
Views
284
Replies
3
Views
568
Replies
3
Views
414
Replies
3
Views
137
Recommended threads
Replies
12
Views
8,789
UVM
Replies
4
Views
2,642
Replies
8
Views
3,637
Replies
5
Views
4,065
Replies
6
Views
4,418
Similar threads
Replies
1
Views
3,531

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top