+ 1
Web Designing
If i work on NotePad++, do i have to put the HTML and CSS codes on the same page? I don't know if you, the person who is reading this qestion, understands this or not. I am new to coding and I need some help.
4 ответов
+ 3
The word processor you use (In this case Notepad++) has nothing to do with how your files need to be stored.
In your case, No, they dont have to be in the same file. In your HTML file you can link the CSS file in the header like this:
<head>
<link rel="stylesheet" type="text/css" href="myStyles.css">
</head>
Where the href contains a link to the name of your file (in this case they are stored in the same folder so it would find myStyles.css)
Similarly you can link JavaScript files to your HTML file by the following code:
<script src="myScript.js"></script>
Where src is a link to the file name and location. Hopefully this helps.
Sorry for bad english 🇨🇦
+ 1
It's not depend by the use of a word processor or another, you can save it where you prefer but you have to put the right path in href attribute of the link tag that @Sam has said.
There's another case: you can put your CSS in a <style> tag in the <head> of your webpage but it's not convenient because css, usually, takes a lot of lines (100, 300, 500, ... ) so this will make your file .html or .php difficult to read
0
nope