What the difference between background-color and background in css3 ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What the difference between background-color and background in css3 ?

4th Nov 2018, 7:58 AM
Mubarak Daha Isa
Mubarak Daha Isa - avatar
2 Answers
+ 3
background is shorthand background-color is more specific Further reading: https://www.w3schools.com/cssref/css3_pr_background.asp
4th Nov 2018, 8:14 AM
Janning⭐
Janning⭐ - avatar
+ 6
the "background" keyword allows you to set any background you want (images etc) while the "background-color" allows you to set only color backgrounds. Their connection is like class-class.property
4th Nov 2018, 8:15 AM
Valen.H. ~
Valen.H. ~ - avatar