Intermediate HTML & CSS
Q68 / 100

What does the CSS "object-fit: cover" property do for an <img> or <video> element?

Correct! Well done.

Incorrect.

The correct answer is B) Scales the content to maintain its aspect ratio while filling the element's box entirely, cropping any overflow

B

Correct Answer

Scales the content to maintain its aspect ratio while filling the element's box entirely, cropping any overflow

Explanation

object-fit: cover scales the replaced content (preserving aspect ratio) so it covers the entire box, cropping parts that overflow — useful for thumbnails that should fill a fixed area without distortion.

Progress
68/100