HTML · Link and navigation attributes

imagesizes

Declares the layout width for preloaded responsive images.

Syntax
imagesizes="(min-width: 40rem) 50vw, 100vw"

Example

Try it

More in this group

as crossorigin download fetchpriority href hreflang imagesrcset integrity

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course