Question 10 of 10Pro Only

How do you make images responsive in CSS?

Sample answer preview

Responsive images adapt to different screen sizes and device capabilities. There are CSS techniques and HTML attributes that work together. The basic CSS approach prevents images from exceeding their container: img { max-width: 100%; height: auto; } max-width: 100% means the…

responsive imagesmax-widthobject-fitbackground-sizesrcsetpicture

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more Frontend Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime