Web Designing | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.

11th Aug 2017, 8:33 PM
Razvan Wist
Razvan Wist - avatar
4 Answers
+ 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 🇨🇦
11th Aug 2017, 9:20 PM
S C
+ 2
I dont understand completely but I'll try to answer you make html page and save it then make css file and save it with .css extension on html page you add <link> tag that shows on css file now thats external css if you are talking about inline or internal css, no you dont have to have them
11th Aug 2017, 8:49 PM
Šimun Ivanac
Šimun Ivanac - avatar
+ 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
12th Aug 2017, 5:55 AM
Michele Virgilio
Michele Virgilio - avatar
0
nope
12th Aug 2017, 5:31 PM
Adabanya Princewill
Adabanya Princewill - avatar