0
how to attach html, css and javascript.
hey mates I'm in big problem can anybody please tell me how to attach html, css and javascript file in on atom help me as soon as possible.
5 RĂ©ponses
+ 2
you can either do what đ#H P 22âąđ says, or you can make separate files for css and js (which i prefer)
Suppose your directory looks like this:
- index.html
- style.css
- main.js
In html file, inside head tag write this:
<link rel="stylesheet" href="style.css" />
And to link the javascript file, go the ending </body> tag and before it, just write this:
<script src="main.js"></script>
+ 1
In your project folder, create these folders:
CSS
Script
In the CSS folder. Create a file named. main.css
In the Script folder. Create a file named. script.js
In your HTML document add this.
<head>
<link href="main.css" rel="stylesheet">
<script src=âscript.jsâ></script>
</head>
+ 1
đ#H P 22âąđ yeah i was just telling him both ways.