CSS Questions & Answers – Backgrounds, Borders and Drop Shadow

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

Answer: c
Explanation:

Syntax: background-attachment: scroll | fixed | inherit

advertisement
advertisement

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

Answer: b
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

Answer: b
Explanation:

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!
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

Answer: d
Explanation:

advertisement
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

Answer: b
Explanation:

advertisement
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

Answer: d
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

Answer: b
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

Answer: d
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

Answer: c
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

Answer: d
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.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.