HTML <picture> Element Reference

The HTML <picture> element provides alternative image sources for responsive images or different formats.

<picture>

HTML <picture> Element Reference

The HTML <picture> element provides alternative image sources for responsive images or different formats.

Categories

  • Embedded content

Tag omission

Consult the HTML Living Standard for the precise tag-omission rules.

Content model

  • Detailed content-model guidance will be added to this reference.

Attributes

Examples

Example

A practical picture element example.

<picture>
  <source srcset="photo.avif" type="image/avif">
  <source srcset="photo.webp" type="image/webp">
  <img src="photo.jpg" alt="Mountain at sunrise">
</picture>

Related references

Description

The HTML <picture> element provides alternative image sources for responsive images or different formats.

References

  1. HTML Living Standard: Index of elements
  2. MDN: HTML <picture> Element

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies