Q: Which CSS value is used to add padding to the top and bottom of an element, but not to the left and right?
-
A
padding-top: 10px; padding-bottom: 10px;
-
B
padding-left: 0px; padding-right: 0px;
-
C
padding: 0px 10px;
-
D
padding: 10px 0px;
D
Answer:
D
Explanation:
The padding property can take up to four values to add padding to different sides of an element. In this case, 10px padding is added to the top and bottom of the element, but not to the left and right.
Related Topic:
Share Above MCQ