Why link tag have href attribute and whereas script tag have src attribute ?? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 5

Why link tag have href attribute and whereas script tag have src attribute ??

Both are used to link external file and both are placed inside Head tag. So why they don't have same attribute ??

23rd Jul 2017, 8:01 AM
Happy Sharma
Happy Sharma - avatar
4 Respostas
+ 2
src = Source is source of the script/image or other and load in to the web šŸ˜‰ href = HyperText Reference is add some CSS file or Document to the web more info https://stackoverflow.com/questions/3395359/difference-between-src-and-href
23rd Jul 2017, 1:16 PM
Art456
Art456 - avatar
+ 3
šŸŒˆšŸŒˆšŸŒˆšŸ˜‰šŸ˜‰šŸ˜‰šŸŒˆšŸŒˆšŸŒˆ
24th Jul 2017, 10:30 AM
Art456
Art456 - avatar
+ 2
I know difference of src and href. But my question is why we don't give src attribute to link tag ?
23rd Jul 2017, 2:24 PM
Happy Sharma
Happy Sharma - avatar
+ 2
Thanks I get it from stack overflow :)
23rd Jul 2017, 2:30 PM
Happy Sharma
Happy Sharma - avatar