Computer Science, asked by gneshninja2653, 1 year ago

Explain the different image element attributes?

Answers

Answered by kittu5797
2
The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.The browser will consider each child <source> element and choose the best match among them; if no matches are found, the URL of the <img> element's src attribute is selected. The selected image is then presented in the space occupied by the <img> element.
To decide which URL to load, the user agentexamines each <source>'s srcset, media, and type attributes to select a compatible image that best matches the current layout of the page, the characteristics of the display device, etc.

Common use cases for <picture>:

Art direction — cropping or modifying images for different media conditions

Offering different image formats when certain formats are not supported by all browsers

If providing higher-density versions of an image for high-DPI (Retina) display, use srcset on the <img> element instead. This lets browsers opt for lower-density versions in data-saving modes, and you don't have to write explicit media conditions.

⬆️⬆️⬆️⬆️⬆️

HOPE IT HELPS

pls Mark me as brainliest ✅✅

kittu5797: Mark my answer as brainliest
Similar questions
Math, 1 year ago