+ 2

why css use href when javascript use src

if u want to load data into html, then src should be used while href is to link to other files. but why does loading css data into html uses href instead of src?

10th Feb 2022, 5:25 PM
Shen Bapiro
Shen Bapiro - avatar
1 Resposta
0
href attribute is commonly used for any linking files in html tags While src is used for javascript because we uses src in script tags thus not only linking tag but also telling html that it is javascript and to run it as js file
10th Feb 2022, 8:05 PM
Umar Farooq