Which property is used to change the background color in CSS?
-
A
color
-
B
background-color
Correct answer
-
C
bgcolor
-
D
background
Correct answer
B. background-color
Explanation
The CSS property background-color sets the background colour of an element, for example background-color: yellow;.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ