+ 4
My HTML and CSS code is wrong or not if right so why it's not wroking in sololearn?
<div>Hello Community</div> <style> div { background-color: hsl(180, 50%, 50%);  color: hsl(120, 0%, 100%); } </style>
14 Answers
+ 6
Vinay Jaiswal u don't need style tags in css part
can u give me the link of ur code
or can u tell me where u put the whole code in html part or css part??
+ 2
Vinay Jaiswal
You have written style for div tag but the text you have written is inside p tag. Either write for p or div.
P.S In the code link you have given.
+ 1
The stye tag is in css but it is not working.
+ 1
Atul is the code : https://code.sololearn.com/WM77JBR61EVm/?ref=app
+ 1
Ok thanks atul
+ 1
Your code is correct however there are some invisible characters preventing the code from working. Clearing your CSS and retyping it will fix the issue.
+ 1
In sololearn
There is CSS block which is linked to your html content
So no need to write style tag in CSS
+ 1
Epikx Dhi
hsl stands for hue, Saturation and lightness
It is used to define color
0
the code should work as i expected. oh, btw, you can only put style in head tag..
0
This is link of code: https://code.sololearn.com/WM77JBR61EVm/?ref=app
0
Vinay, you should follow the rules of writing HTML code with CSS
View this code to see a good rules on writing HTML code
https://code.sololearn.com/WaZlRMTXHl6g/?ref=app
0
What is hsl() guys?