diffsnack
HTML Guess the result Level 7

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>
  1. The AVIF or the WebP photo
  2. A broken-image icon
  3. Nothing at all
  4. The file name as text

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.

Play this exercise Learn the concept: Figures, picture and media