What's the difference between a simple hyperlink using anchor tag and a hyperlink with defined target? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What's the difference between a simple hyperlink using anchor tag and a hyperlink with defined target?

i.e. while playing the codes - one with target="_blank" and one with only href , I found the same output

22nd Nov 2017, 5:37 PM
Meghna Kulkarni
Meghna Kulkarni - avatar
4 Answers
+ 2
Without a defined target the link gets opened in the same tab/window where the link was. If you define it, to e. g. _blank, it opens in a new window/tab
22nd Nov 2017, 5:40 PM
Josef Held
Josef Held - avatar
22nd Nov 2017, 5:42 PM
Josef Held
Josef Held - avatar
+ 1
thanks for this
22nd Nov 2017, 5:44 PM
Meghna Kulkarni
Meghna Kulkarni - avatar