+ 2

In css, how do I colour my background??

16th Jun 2021, 5:30 PM
Prince Heritage
Prince Heritage - avatar
3 Answers
+ 6
body { background-color:black; }
16th Jun 2021, 5:35 PM
Tharul Nejana
Tharul Nejana - avatar
+ 1
You can change the background color of any element using this syntax: background-color: color | transparent | initial | inherit; For example, the background color for a div element can be changed like this: div { background-color:#ffccff; }
16th Jun 2021, 6:34 PM
Anastasia Verbitskaya
0
You can use background instead background-color it's better and you can use image in it if u want
17th Jun 2021, 1:51 PM
Jad Yahya
Jad Yahya - avatar