+ 2

How can i link html files to css and js

19th Jul 2017, 6:35 AM
Olajide Nathaniel
Olajide Nathaniel - avatar
3 odpowiedzi
+ 5
In my opinion the best practice is to place the CSS file in the header <head> <link rel="stylesheet" href="css/layout.css" type="text/css"> </head> and the Javascript file before the closing </body> tag <script type="text/javascript" src="script.js"></script> </body> Also if you have, like you said two CSS files. The browser would use both. If there were any selectors, ie. .content {} that were the same in both CSS files the browser would overwrite the similar properties of the first one with the second one's properties. If that makes sense.
19th Jul 2017, 6:37 AM
Apoorva Shenoy Nayak
Apoorva Shenoy Nayak - avatar
0
To link JavaScript file use : <script src="file. js"> </Script>
19th Jul 2017, 8:30 PM
Abdalghani Omer
Abdalghani Omer - avatar
0
my link is not workning please check
21st Apr 2020, 6:26 AM
Arijit Dey SarKar
Arijit Dey SarKar - avatar