Inserting link | Sololearn: Learn to code for FREE!

Inserting link

I inserted this in the head tag after giving the title tag => <link href="" rel="stylesheet"> , but couldnt open the link in the html document. Whereas when I inserted this => <a href="">Visit my HTML tutorial</a> , the link opened well. Please explain the reason and also the difference between these two insertions

24th May 2019, 6:59 AM
Yash Anand Mutatkar
1 Resposta
<link> is an 'empty' tag that should only be used in the head section. It's for linking together things that the page needs, not for showing stuff to the end user. <a></a> is not an empty tag - you can put stuff between the start and end tag. It should only be used in the body section, and you can show stuff to the end user.
24th May 2019, 7:14 AM
Rincewind - avatar