+ 1

Help me find the error in my code

Can anyone tell me why my link won't open? HTML: <a href="http://www.cnn.com" target="_blank"> Link to News Website </a>

31st Dec 2017, 11:15 PM
Imy Berry
Imy Berry - avatar
8 Answers
+ 2
If this is in SoloLearn, I'm not sure, but try removing the "target='_blank'" line, because that causes the page to open in a new window, and that isn't possible in the SoloLearn code playground environment.
1st Jan 2018, 1:16 AM
LunarCoffee
LunarCoffee - avatar
+ 2
Code works fine. @LunarCoffee target="_blank" works in the sololearn app, at least Android. It will open the page in your default browser. IDK about the web based version though, as I haven't tested it.
1st Jan 2018, 1:20 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
@Imy Berry it opens just fine in my browser from the app on my android phone.
1st Jan 2018, 3:36 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
Maybe there's a bug in the iOS version that doesn't allow the target code?
1st Jan 2018, 10:31 AM
Imy Berry
Imy Berry - avatar
+ 1
Looks like there is no problem
31st Dec 2017, 11:28 PM
Luca Marseglia
Luca Marseglia - avatar
+ 1
But the link won't open in my browser. Is it that the app doesn't connect to the browser on my phone? Thanks!
1st Jan 2018, 3:30 AM
Imy Berry
Imy Berry - avatar
+ 1
LunarCoffee was right! I took out the target code and now the link opens, thanks guys/ gals!
1st Jan 2018, 3:33 AM
Imy Berry
Imy Berry - avatar
0
oh ok
1st Jan 2018, 1:22 AM
LunarCoffee
LunarCoffee - avatar