How to file css With html I will link, I will link, but the command css I hit on html It doesn't work | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to file css With html I will link, I will link, but the command css I hit on html It doesn't work

1st Mar 2023, 5:16 PM
Abbas Nilab
Abbas Nilab - avatar
6 Respostas
+ 1
How can we know what your code looks like?
1st Mar 2023, 9:23 PM
Toni Isotalo
Toni Isotalo - avatar
+ 2
Please don't post duplicated question, if you didn't get answer, just wait and help us by giving more info and showing code.. Your code inside css is invalid, and this is probably only reason why it does not work. We can't nest style selectors. For this you can use css preprocessors like sass or less. So change your code to: p { color: red; } Inside sololearn, we don't have to link css it is automatically linked. But if this does not help you then it can be because path to css is not right. Tell us more about project structure, where do you define html file and where is your css file. With this info we can check is your path good or not. Right now it should select css file if it is located inside same folder as html, and make sure file is named same and it is .css not .css.txt sometimes when we save code(without using coding editor, or by clicking auto save) it is saved as text file
1st Mar 2023, 11:23 PM
PanicS
PanicS - avatar
+ 1
Can we first know for code
2nd Mar 2023, 8:43 AM
šŸ”„ nunu šŸ”„
šŸ”„ nunu šŸ”„ - avatar
0
Help me please šŸ„ŗ
1st Mar 2023, 5:16 PM
Abbas Nilab
Abbas Nilab - avatar
1st Mar 2023, 9:58 PM
Abbas Nilab
Abbas Nilab - avatar
0
In your CSS file, remove the body and it will run correctly. In your html file, you didn't add <body>, but you added it in the CSS. Perhaps you confused it! So, the correct code in CSS should read: p } color: red; } Good luck!
3rd Mar 2023, 11:20 AM
Jayne Clifford-Greening
Jayne  Clifford-Greening - avatar