Open In App

What is the <picture> Element used for in HTML5 ?

The <picture> element in HTML5 is used for responsive image rendering. It allows developers to provide multiple sources of an image and define different versions based on factors like screen size or resolution.

This also ensures optimal image display across various devices, promoting a more efficient and visually pleasing user experience without the need for additional scripting or complex CSS.

Usage

Syntax

<picture>
Image and source tag
<picture>
Article Tags :