- Using the \<img\> Element with srcset and sizes Attributes
- Using the \<picture\> Element to Display Different Images for Different Viewport Sizes
- Displaying Images in Alternative Formats with the \<picture\> Element
- Optimizing Images for Responsive Web Design: Techniques for Different Viewport Sizes Quiz 5 questions
Well done!
You have completed Optimizing Images for Responsive Web Design: Techniques for Different Viewport Sizes Quiz!
Quiz Question 1 of 5
To provide an alternative image format that has smaller file sizes, you use this <picture>
setup:
<picture>
<source type="image/webp" srcset="images/mountains.webp">
<img src="images/mountains.png" alt="mountains">
</picture>
What will happen if the browser doesn’t support WebP?
Choose the correct answer below: