JNRT Pixel
|
728 × 90 — Leaderboard
Cookie-Banner ausstehend
Home / Glossary / sizes attribute

sizes attribute

Web & performance

Tells the browser which image width to expect per viewport.

Goes hand in hand with `srcset`. Example: `sizes="(max-width: 600px) 100vw, 50vw"`. Without `sizes` the browser often picks unnecessarily large variants and wastes bandwidth.

Sources:MDN — sizes
← All terms→ Deutsch