dimitrijjedich / html-tutorial

0 stars 0 forks source link

picutre-element #15

Closed dimitrijjedich closed 11 months ago

dimitrijjedich commented 11 months ago

The HTML <picture> element allows you to display different pictures for different devices or screen sizes.

When to use the Picture Element

There are two main purposes for the <picture> element:

1. Bandwidth

If you have a small screen or device, it is not necessary to load a large image file. The browser will use the first <source> element with matching attribute values, and ignore any of the following elements.

2. Format Support

Some browsers or devices may not support all image formats. By using the `` element, you can add images of all formats, and the browser will use the first format it recognizes, and ignore any of the following elements.