0

I'm having issues with linking my css from css folder with my html in html folder. What could be the problem as I've use link?

<link rel="stylesheet" type="text/css" hreef="css/a.css> this is my html index page while my css name is a.css

23rd Feb 2020, 7:31 AM
Azuka Ofili
Azuka Ofili - avatar
7 Respuestas
+ 1
That is 'href' and make sure that you have your html and CSS file in the same folder. Also you have missed a " to enclose your CSS file name.
23rd Feb 2020, 7:51 AM
Avinesh
Avinesh - avatar
+ 1
It can work from a different folder but the path provided should be correct. Like "D:/folder_name/css/a.css" or something similar.
23rd Feb 2020, 8:03 AM
Avinesh
Avinesh - avatar
+ 1
First off, you need to make sure the css and html file are in the same folder. This is one of the main reasons it never works for me when I'm not paying attention. The code needs to look like this for a css file: <link rel="stylesheet" src"examplefile.css"> You just put the actual file name. It also helps to put .css at the end of the file instead of .html and stuff. I hope this helps! Have fun coding!
25th Feb 2020, 11:26 PM
Aiki
Aiki - avatar
0
Can't it work on a separate folder? I am aware it works on the same 📁. The enclosed " is a typo error thanks for noticing it.
23rd Feb 2020, 8:00 AM
Azuka Ofili
Azuka Ofili - avatar
0
OK, that's where I'm having issue. Do I write the path along in the href?
23rd Feb 2020, 8:07 AM
Azuka Ofili
Azuka Ofili - avatar
0
Yes
23rd Feb 2020, 8:08 AM
Avinesh
Avinesh - avatar
0
Can I chat you privately?
23rd Feb 2020, 8:09 AM
Azuka Ofili
Azuka Ofili - avatar