The srcset attribute on an <img> tag specifies multiple image resources (URLs) for the img element.
Together with the sizes attribute they create responsive images that adjust according to browser conditions.
A srcset attribute on an <img> element.
Resizing the browser will adjust the image file used.
Example:
HTML
<img srcset="https://horje.com/avatar.png 120w,
https://horje.com/avatar.png 193w,
https://horje.com/avatar.png 278w"
sizes="(max-width: 710px) 120px,
(max-width: 991px) 193px,
278px">
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |