Images & Media MCQ
15 Questions
Time: ~25 mins
Beginner
CSS Images & Media — MCQ Test
Practice fluid images, object-fit, aspect-ratio, backgrounds, and avoiding layout shift with responsive media.
Easy: 5 Q
Medium: 6 Q
Hard: 4 Q
Responsive Images in CSS
Combine HTML width/height attributes (or aspect-ratio) with CSS so images scale without breaking layout—Core Web Vitals care about CLS.
object-fit
Use cover/contain to crop or letterbox images inside a fixed box—essential for avatars, cards, and hero media.
Fluid image rule
img { max-width: 100%; height: auto; } — keeps images inside their container.