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 ответов
+ 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.