Fill in the blank: Adding width and height attributes to images helps reduce _________________.
- First Input Delay
- Total Blocking Time
- Cumulative Layout Shift
- Time to Interactive
Explanation: Adding width and height attributes to images helps reduce Cumulative Layout Shift. Cumulative Layout Shift (CLS) refers to the unexpected shifting of page elements during the loading process, which can disrupt the user experience, particularly when content shifts while users are interacting with the page. When an image loads without specified dimensions, the browser might not be able to allocate sufficient space for it, causing the content layout to shift once the image is fully loaded. This can be especially problematic on pages with multiple images or dynamic content. By adding width and height attributes to images in HTML, developers can reserve the required space for images before they load, preventing sudden layout shifts as the images render. This optimization improves the stability and predictability of the page layout, enhancing user experience and reducing the likelihood of CLS occurrences. Therefore, adding width and height attributes to images is an effective strategy for mitigating Cumulative Layout Shift and promoting a smoother browsing experience for users.