Best Reference Books

CSS Questions & Answers – CSS Box Model

1. Which of the following property adds padding to the top of an element?
a) height
b) padding-height
c) top
d) padding-topView Answer

Answer: d
Explanation: Self-explainatory.

2. Which of the following display property value is described by treats the element as inline?
a) inline-block
b) list-item
c) block
d) inlineView Answer

Answer: d
Explanation: Self-explainatory.

3. Which of the following property defines the style for the bottom border of an element?
a) border-bottom-style
b) border-collapse
c) border-style-bottom
d) none of the mentionedView Answer

Answer: a
Explanation: Self-explainatory.

4. Which of the following property defines the style for the left border of an element?
a) border-style
b) border-left-style
c) border-left-width
d) border-rightView Answer

Answer: b
Explanation: Self-explainatory.

5. 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 mentionedView Answer

Answer: b
Explanation: None.

6. Which of the following display property value is described by used internally by browsers to create list items. Of no practical value to web designers?
a) inline-block
b) list-item
c) group
d) noneView Answer

Answer: b
Explanation: Self-explainatory.

7. 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-kView Answer

Answer: a
Explanation: Self-explainatory.

8. Which of the following Overflow property value is described by scrollbars should be provided if the content is too big, but actual implementation is left up to the browser?
a) visible
b) scroll
c) auto
d) hiddenView Answer

Answer: c
Explanation: Self-explainatory.

9. Which of the following property sets a consistent margin on all four sides of the affected element?
a) boder
b) margin
c) padding
d) none fof the mentionedView Answer

Answer: b
Explanation: Self-explainatory.

10. Which of the following box-sizing property value is described by width and height include content, padding, and borders?
a) border-box
b) content-box
c) content-box
d) none fof the mentionedView Answer