What's wrong with the following code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's wrong with the following code?

a href="https://rawishpaul.com"> <span> <a href="#">Click me!</a> </span> </a>

18th Mar 2018, 9:30 PM
Rawish Paul
Rawish Paul - avatar
2 Answers
+ 6
There's no need for nesting hyperlink here, the text between <a> and </a> is the text for the hyperlink, normally it is shown with underlined effect unless it is styled with CSS. Remove <a href="#"> before and the </a> following the "Click me!" and it will work. Hth, cmiiw
18th Mar 2018, 9:44 PM
Ipang
0
The anchor (a) tag in the code you pasted in is missing the first <. Also you do not want another nested anchor tag within the first: anchor, span, your content, close span, close anchor.
18th Mar 2018, 9:50 PM
Roger Cruz