CodePark/ questions / Core Web Vitals
START PRACTICINGPRACTICE
Frontend question · Browser & web performance › Core Web Vitals

Which of these contributes to CLS?

An image without width and height pushing the article text down when it loads

An image without width and height has no reserved space. When it loads, it pushes visible text down. This is the classic cause of CLS (Cumulative Layout Shift: how much visible content moves unexpectedly).

The other options don't count toward CLS:

• The accordion is a tempting wrong answer. Shifts within 500 ms of a user input are excluded, because the user expects them.

• The spinner uses
transform, and transform animations do not move layout.
• Content below the fold is outside the viewport. Only shifts of content in the viewport count.