This set of CSS Multiple Choice Questions & Answers (MCQs) focuses on “Backgrounds, Borders and Drop Shadow”.
1. Which of the following property sets the background image to scroll or not to scroll with its associated element’s content?
a) background-scroll
b) background-attach
c) background-attachment
d) background-allowance
View Answer
Explanation:
Syntax: background-attachment: scroll | fixed | inherit
2. Which of the following property sets an element’s background color?
a) background-image
b) background-color
c) background-colors
d) background-position
View Answer
Explanation:
Syntax: background-color: color | transparent
3. Which of the following property defines the color of an element’s right border?
a) border-right-colors
b) border-right-color
c) border-right
d) border-color
View Answer
Explanation:
Syntax: border-right-color: color | transparent
4. Which of the following property defines the space between cells in a table?
a) auto
b) border
c) spacing
d) border-spacing
View Answer
Explanation:
Syntax: border-spacing: non-negative length(s) | inherit
5. Which of the following property defines the visual style of up to four different sides of a border?
a) border-color
b) border-img
c) border-visual
d) border-style
View Answer
Explanation:
Syntax: border-style: style
6. Which of the following property defines in a shorthand form the width, style, and color for the top border of an element?
a) border-style
b) border-height
c) border-width
d) border-top
View Answer
Explanation:
Syntax: border-top: border-width border-style border-color;
7. Which of the following property sets the shadow for a box element?
a) shadow
b) set-shadow
c) canvas-shadow
d) box-shadow
View Answer
Explanation:
Syntax:box-shadow: none | inherit
8. Which of the following property defines a shadow effect for text?
a) box-shadow
b) img-shadow
c) text-shadow
d) none of the mentioned
View Answer
Explanation: The shadow effects are applied in the order specified and may overlay each other, but they will never overlay the text itself. Each shadow effect must specify a shadow offset horizontally and vertically and may optionally specify a blur radius and a shadow color.
9. Which of the following property defines a shadow color for the right and bottom edges of a scroll bar?
a) scrollbar-darkshadow
b) scrollbar-shadow-color
c) scrollbar-darkshadow-color
d) none of the mentioned
View Answer
Explanation:
Syntax: scrollbar-darkshadow-color: color
10. Which of the following property defines a color for the right and bottom edges of a scroll bar.
a) scrollbar-color
b) scrollbar-darkshadow-color
c) scrollbar-shadow
d) scrollbar-shadow-color
View Answer
Explanation:
Syntax: scrollbar-shadow-color: color
Sanfoundry Global Education & Learning Series – CSS.
To practice all areas of CSS, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check CSS Books
- Practice HTML MCQ
- Practice Computer Science MCQs
- Practice Information Science MCQs
- Check Computer Science Books