How to add css file and javascript file on html file? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to add css file and javascript file on html file?

25th May 2017, 4:53 AM
Roland Doctor
Roland Doctor - avatar
6 Answers
+ 5
<link rel="stylesheet" href="cssfilepath.css"> <script src="JavaScript filefath.js" ></script>
25th May 2017, 5:00 AM
MR Programmer
MR Programmer - avatar
+ 17
Put this in the head section : <script type="text/javascript" src="(any).js"></script> <link href="(any).css" rel="stylesheet" type="text/css"/>
25th May 2017, 5:00 AM
Dev
Dev - avatar
+ 1
Please add the corresponding keywords to add the external sample.js file to the web page. <script type="text/javascript" src ="sample.js"> </script>
1st Jul 2020, 6:25 PM
Rustamjon Kosimov
Rustamjon Kosimov - avatar
0
Please add the corresponding keywords to add the external sample.js file to the web page. <="text/javascript" ="sample.js"></script> answer will be : //script, //type, //src
1st Mar 2020, 10:37 AM
Sadman Fahim
Sadman Fahim - avatar
- 1
Path to file (attribute src for JS and href for CSS) might be relative (i.e. "../css/custom.css") and absolute ("~/www/site/static/css/custom.css").
25th May 2017, 5:31 AM
Александр Холодов
Александр Холодов - avatar
- 3
for css file add this line to the head tag : <link href="" rel="stylesheet" type="text/css"> where href should include the url to your css file for script file add this line to the head tag : <script src="" type="text/javascript"> where src should include the url to your javascript file
25th May 2017, 5:06 AM
Loai Hazima
Loai Hazima - avatar