HTML exercise: Figures, picture and media — What does the browser show?
The exercise
What does the browser show?
1<picture>
2 <source srcset="img/band.avif"
3 type="image/avif">
4 <source srcset="img/band.webp"
5 type="image/webp">
6</picture>
Solution
Answer: Nothing at all
A <picture> only offers file choices, and the image is actually drawn by the <img> inside it. Without an <img> there is nothing to draw, so the page shows nothing at all.