+ 1

Why my code doesn't work?

<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body style="background:green"> <style> #containar{ width:50%; hieght:50%; background:red; position:absolute; } </style><div id=container></div> </body> </html>

2nd Nov 2020, 11:03 AM
RD:programmer
RD:programmer - avatar
13 ответов
+ 5
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body style="background:green"> <style> #container{ width:50%; hieght:50%; background:red; position:absolute; } </style><div id="container">this is added to see effect Mr. Unknown </div> </body> </html>
2nd Nov 2020, 12:42 PM
Jayakrishna 🇮🇳
+ 7
You spelled containar instead of container
2nd Nov 2020, 11:13 AM
Knutsson303
Knutsson303 - avatar
+ 3
Your div tag was empty.
2nd Nov 2020, 11:49 PM
Sonic
Sonic - avatar
+ 2
When i put it between head tag another head tag appeare.automatically in code by cpu.
2nd Nov 2020, 12:39 PM
RD:programmer
RD:programmer - avatar
+ 2
O😲. Jayakrishna🇮🇳 thank you ,it worked .
2nd Nov 2020, 12:48 PM
RD:programmer
RD:programmer - avatar
+ 2
And thanks to all .............🙏🙏🙏🙏
2nd Nov 2020, 12:48 PM
RD:programmer
RD:programmer - avatar
+ 2
Gggg
3rd Nov 2020, 8:51 AM
Xuseen Xasan
Xuseen Xasan - avatar
+ 1
the <style> tag should not be between <body> it should be in the between <head> tag
2nd Nov 2020, 12:34 PM
Sacalivin Obiri
Sacalivin Obiri - avatar
+ 1
Not worked
2nd Nov 2020, 12:38 PM
RD:programmer
RD:programmer - avatar
+ 1
Don't spell wrong and "":.,etc😊😊
3rd Nov 2020, 2:34 AM
Sam_Sameer
Sam_Sameer - avatar
0
Till not worked 😟
2nd Nov 2020, 11:52 AM
RD:programmer
RD:programmer - avatar
0
Mr. Unknown Can you add more details what not working? Note : you can't see any working there because you don't have any value in container to see changes... Add something to div, you can see..
2nd Nov 2020, 12:22 PM
Jayakrishna 🇮🇳
0
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body style="background:green"> <style> #container{ width:50%; hieght:50%; background:red; position:absolute; } </style><div id="container">thisMr. Unknown </div> </body> </html>
4th Nov 2020, 12:08 AM
Ashhar Ahmed
Ashhar Ahmed - avatar