How can I link with html and css | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can I link with html and css

<

12th Jun 2019, 5:13 PM
ABE
ABE - avatar
7 Answers
+ 4
<link rel=“stylesheet” href=“name.css”></link> (pretty sure it has a closing tag, but not 100%)
12th Jun 2019, 5:19 PM
Jax
Jax - avatar
+ 3
Jax , it doesn't has closing tag. The syntax is : <link rel="stylesheet" href="style.css"/> It's a self-closing tag !!
12th Jun 2019, 6:10 PM
Ayan Fox
Ayan Fox - avatar
+ 2
ABE, that problem happened many times with me. I just deleted the whole code and wrote it again. 😆😆 It works sometimes. Ok. Let me show you more. Main_File | |__ index.html |__ script.js |__ style.css Only then the code will work.
12th Jun 2019, 6:43 PM
Ayan Fox
Ayan Fox - avatar
+ 2
If you placed your style.css on your PC but compiling codes on Sololearn, that's not gonna work.
12th Jun 2019, 6:44 PM
Ayan Fox
Ayan Fox - avatar
0
I try several times on that way but it didn't work and I could not find my mistake
12th Jun 2019, 6:38 PM
ABE
ABE - avatar
0
And also we have to write between head tag
12th Jun 2019, 6:39 PM
ABE
ABE - avatar
0
I think smth wrong with my laptop
12th Jun 2019, 6:39 PM
ABE
ABE - avatar