Which CSS3 property enables shadows around elements?

Prepare for the uCertify CIW Advanced HTML5 and CSS3 Specialist Exam. Dive into essential topics with flashcards and multiple-choice questions. Enhance your understanding with hints and explanations for each question. Pass your exam confidently!

Multiple Choice

Which CSS3 property enables shadows around elements?

Explanation:
Shadows around elements are created with the box-shadow property. It attaches a shadow to the element’s box and lets you control horizontal and vertical offsets, blur radius, optional spread, and color, giving a soft, natural shadow around the element. For example, box-shadow: 3px 4px 6px rgba(0,0,0,0.4) creates a subtle shadow that sits behind and around the element’s edges. Text-shadow, by contrast, applies a shadow to the characters themselves, not to the whole element. Outline draws a line around the element’s border without blurring or shading like a shadow, and there isn’t a separate standard shadow property named simply “shadow.” So, box-shadow is the correct tool for shadows around elements.

Shadows around elements are created with the box-shadow property. It attaches a shadow to the element’s box and lets you control horizontal and vertical offsets, blur radius, optional spread, and color, giving a soft, natural shadow around the element. For example, box-shadow: 3px 4px 6px rgba(0,0,0,0.4) creates a subtle shadow that sits behind and around the element’s edges. Text-shadow, by contrast, applies a shadow to the characters themselves, not to the whole element. Outline draws a line around the element’s border without blurring or shading like a shadow, and there isn’t a separate standard shadow property named simply “shadow.” So, box-shadow is the correct tool for shadows around elements.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy