A single large image wastes bandwidth on phones; a small one looks blurry on high-density screens. HTML has two tools to let the browser pick the best file. srcset + sizes — same image, different resolutions srcset lists candidate files with their widths (800w). sizes tells the browser how wide the image will be displayed at each breakpoint. The browser then downloads the smallest file that still looks sharp on that device. <picture> — different images or formats Use <picture> for art direction (a tighter crop on mobile) or for modern formats (AVIF/WebP) with a JPEG fallback. The browser uses the first <source> it supports; the inner <img> is required and provides alt and the fallback. Performance attributes Attribute Effect width / height Reserves space → prevents layout shift (CLS)…