+ 2
what's the difference between href and src?
I mean they say "href" is for external links, and src is for local stuff, but then we use "href" to link our CSS file which is already in our local disk🤔. Pls Explain 🙏
2 Respuestas
+ 6
href: Is a reference to information for the current page ie css info for the page style or link to another page. Page Parsing is not stopped.
src: Is a resource to be added/loaded to the page as in images or javascript. Page Parsing may stop depending on the coded attribute. That is why it's better to add script just before the ending body tag so that page rendering is not held up.
Hence <src> adds some resources to the page and <href> is just for providing a link to a resource(without adding the resource itself to the page).
+ 1
Dilia Matus Thanks I now understand it👍