On this page
  1. <picture>
  2. Summary
  3. Notes & Best Practices
  4. Example

<picture>

Prev: `<img>` | Up: media | Next: `<figure>`
Rel: media, Tables & Media Guide
Ref: MDN Web Docs — <picture>
Tags: #public #web #html #elements #media #tier/standard


Summary

Selects image formats (AVIF/WebP) or responsive crops via <source> children.

Notes & Best Practices

Example

<picture>
  <source srcset="hero.avif" type="image/avif" />
  <source srcset="hero.webp" type="image/webp" />
  <img src="hero.jpg" alt="Product overview" width="800" height="450" />
</picture>

Linked from

Related notes