CSS MCQ Questions And Answers - Box Model
This section focuses on "Box Model" in Cascading Style Sheets (CSS). These Multiple Choice Questions (MCQ) should be practiced to improve the Cascading Style Sheets (CSS) skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. Which part of box model clears an area around the content?
A. Padding
B. Border
C. Margin
D. None of the above
View Answer
Ans : A
Explanation: Padding : Clears an area around the content.
2. Which part of box model is transparent?
A. Padding
B. Margin
C. Border
D. Both A and B
View Answer
Ans : D
Explanation: The padding and margin is transparent
3. When you set the width and height properties of an element with CSS, you just set the width and height of the?
A. Padding
B. Margin
C. content
D. border
View Answer
Ans : C
Explanation: When you set the width and height properties of an element with CSS, you just set the width and height of the content area.
4. The content of the box, where text and images appear.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: Content : The content of the box, where text and images appear
5. Which of the following property adds padding to the top of an element?
A. height
B. padding-height
C. top
D. padding-top
View Answer
Ans : D
Explanation: padding-top property adds padding to the top of an element
6. Which of the following display property value is described by treats the element as inline?
A. inline-block
B. list-item
C. block
D. inline
View Answer
Ans : D
Explanation: inline display property value is described by treats the element as inline.
7. border-bottom-style property defines the style for the bottom border of an element.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: border-bottom-style property defines the style for the bottom border of an element
8. Which of the following visibility property value is described by The element is not visible, but the layout of surrounding elements is not affected?
A. visible
B. hidden
C. collapse
D. None of the above
View Answer
Ans : B
Explanation: hidden visibility property value is described by The element is not visible, but the layout of surrounding elements is not affected.
9. Which of the following property controls the horizontal overflow of a block or inline block?
A. overflow-x
B. overflow
C. overflow-y
D. overflow-k
View Answer
Ans : A
Explanation: overflow-x property controls the horizontal overflow of a block or inline block
10. The box model allows us to add a border around elements, and to define space between elements.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: The box model allows us to add a border around elements, and to define space between elements.
Discussion