⭐ Beginner — No coding experience needed
Cumulative Layout Shift: Find and Fix Every Jumping Element
Learn what CLS is, how to find every element on your page that shifts during load, and how to fix the 5 most common causes in under an hour.
What you will learn in this guide
- What CLS measures and how it is calculated
- How to use Chrome DevTools to find shifting elements
- The 5 most common causes of CLS
- Quick fixes for images, ads, fonts and embeds
- How to verify CLS improvements before pushing live
1 What CLS actually measures
CLS is the sum of how much content shifts during the page load, weighted by how visible the shifted element is. A small shift in a tiny corner barely counts; a big shift right where you're reading is heavily penalised.
Target: under 0.1Below 0.1 is "good". 0.1-0.25 is "needs improvement". Above 0.25 is "poor" and actively hurts rankings.
2 How to find shifting elements
- 1Open Chrome DevToolsRight-click anywhere on the page, choose Inspect, then open the Performance tab.
- 2Record a fresh page loadClick the record button (circle) and reload the page. Stop recording after the page is fully loaded.
- 3Look at the Experience trackEach shift event is marked with a red bar. Hover to see exactly which element moved and by how much.
- 4Open the CLS Debugger toolFor a faster overview, run performance-tools.html#cls-debugger which lists every shifting element with the fix recommendation.
3 The 5 most common CLS causes
| Cause | Symptom | Fix |
|---|---|---|
| Images without dimensions | Text below image jumps down when image loads | Add width and height attributes to every |
| Web fonts swapping | Headlines and paragraphs reflow when font loads | Use font-display: swap and matching fallback metrics |
| Ads loaded after content | Whole page jumps when ad slot appears | Reserve ad height with min-height CSS |
| Embeds (YouTube, Twitter) | Page jumps when embed renders | Use aspect-ratio CSS to reserve space |
| Cookie banners/alerts | Content pushed down by banner | Use position: fixed instead of pushing content |
4 Real example: fixing CLS from 0.32 to 0.04
A typical WordPress site fix sequence:
- 1Add image dimensions site-wideFor WordPress: use a plugin like "Add Image Dimensions" or add to functions.php. For custom sites: add width/height to every
.
- 2Reserve hero image spaceIn CSS:
.hero-img { aspect-ratio: 16/9; }so the layout doesn't change as the image loads. - 3Switch banner from push to overlayCookie banners should be position: fixed at the bottom, not above the page content pushing everything down.
- 4Defer Twitter/YouTube embedsLazy-load embeds with intersection observer; reserve their height with CSS so the page doesn't shift when they appear.
Verify each fixby re-running the CLS Debugger. CLS improvements are visible within 28 days in field data but show immediately in lab data.