What Is Cumulative Format Shift (CLS)?
Cumulative Format Shift (CLS) measures the visible stability of your webpage’s content material as a consumer views it. This metric takes into consideration sudden motion of components within the viewport because the web page masses.
These sorts of structure shifts can frustrate customers as a result of they happen with out warning. Making for a poor consumer expertise.
For instance, think about you’re seeking to purchase new footwear, so that you go to a product web page for a pair you want. The web page begins to load, and you understand you need the pair so that you go to click on or faucet the purchase button.
However then an advert masses on the high of the display, and the purchase button shifts down. Simply as you had been about to click on it. So you find yourself clicking on the advert as an alternative.
That is an sudden structure shift.

CLS is barely involved with sudden structure shifts above the fold. Format shifts that occur exterior of the viewport are usually not factored into your CLS rating.
Cumulative Format Shift is certainly one of Google’s Core Net Vitals (CWVs). These are metrics Google makes use of to measure your web site’s consumer expertise.
In addition to CLS, there are two different Core Net Vitals:
- Largest Contentful Paint (LCP): Measures your web page’s perceived load velocity
- Interplay to Subsequent Paint (INP): Assesses how responsive your web page is
Core Net Vitals are web page expertise alerts that may have an effect on your rankings. So, adhering to Google’s suggestions according to good CWV scores can result in higher efficiency in search outcomes.
For CLS particularly, that usually includes limiting the quantity and extent of shifts of various components on the web page.
Find out how to Measure Cumulative Format Shift
There are just a few methods to measure your Cumulative Format Shift rating:
Google’s PageSpeed Insights
PageSpeed Insights analyzes your web site’s CLS on each cell and desktop.
To search out your rating, merely enter your web site’s URL (or a particular web page you wish to take a look at) within the device and click on the “Analyze” button.

You’ll see a report of your CLS efficiency and different Core Net Vitals.

Scroll all the way down to the “Diagnostics” part and choose the “CLS” filter to see suggestions particularly concerning Cumulative Format Shift.

Notice that PageSpeed Insights can solely analyze one web page at a time.
It’s also possible to use Lighthouse inside Chrome’s DevTools. Keep in mind that this knowledge might present barely completely different outcomes. However you may entry it with out leaving the web page you’re seeking to analyze.
Good click on wherever on the web page and choose “Examine” (or use Ctrl+Shift+I on Home windows, or Cmd+Possibility+I on Mac).

Within the window that seems, click on the “Lighthouse” tab. Change any related settings and click on “Analyze web page load.”

You’ll then see an analogous set of outcomes as you’ll in PageSpeed Insights.

As with the PageSpeed Insights device, you may solely use Lighthouse to research one web page at a time.
Semrush’s Web site Audit Device
Semrush’s Web site Audit device enables you to verify your Cumulative Format Shift rating for a number of web site pages directly.
Merely enter your area identify, and click on the “Begin Audit” button.

Then, configure the device’s settings in response to your preferences. And click on on “Begin Web site Audit” to generate your report.

Within the “Thematic Studies” widget, click on “View particulars” below “Core Net Vitals.”

Scroll all the way down to see an summary of your Cumulative Format Shift scores.

Click on on a difficulty below the “High Enhancements” space to get extra data and proposals. The device additionally reveals the variety of pages every situation impacts.

Scroll all the way down to the “Analyzed Pages” desk to see which pages Web site Audit analyzed in your Core Net Vitals. Click on “Edit record” and add as much as 10 pages you wish to analyze.

The modifications will come into impact while you run the audit once more.
What Is a Good CLS Rating?
An excellent CLS rating is 0.1 or decrease. This implies your structure stays secure because it masses. So, guests can simply learn, click on, and work together together with your content material with out sudden shifts disrupting their expertise.
Right here’s the efficiency scale:

Your Cumulative Format Shift rating is a measure of the biggest burst of structure shift scores for sudden structure shifts as your web page masses. And structure shift shift scores are made up of two elements:
- Affect fraction
- Distance fraction
The place:
Format shift rating = influence fraction x distance fraction
Which means the bigger the weather that shift and the additional they shift, the upper your CLS rating will probably be. Likewise, plenty of structure shifts of any magnitude that happen in fast succession will result in larger CLS scores.
Frequent Points That Trigger a Poor CLS Rating
Photographs With out Dimensions
Once you add photos to your webpage with out specifying their width and top, the browser would not know the way a lot house to allocate till they end loading. This will trigger different components on the web page to shift unexpectedly.
Think about you click on on a hyperlink to a weblog publish. The title and textual content load in, and simply as you begin studying, all of the textual content shifts down as a result of a big picture masses beneath the title however above the physique textual content. That is an sudden structure shift because of the creator not specifying picture dimensions.

Adverts, Embeds, and iFrames With out Dimensions
Adverts, embeds, and iframes with out set dimensions can even trigger structure shifts. These components can push content material round as they load, resulting in a poor consumer expertise.
That is widespread with third-party adverts particularly. As you might have restricted management over the sizes of adverts your community inserts into your content material.
Dynamically Injected Content material
Once you dynamically add content material (like a banner of associated posts or a type widget) to a web page with out first counting on consumer interplay, you may trigger sudden structure shifts.
Dynamically added content material can embody:
- Photographs or movies that load in response to consumer actions
- Banners that seem after a sure period of time on the web page
- Adverts that seem as you scroll
- Social media feeds that load extra posts robotically
- Remark sections that broaden
When dynamically injected content material seems in a means that pushes different components round on the web page, it ends in sudden structure shifts. Affecting your CLS rating.
Net Fonts Inflicting FOIT/FOUT
Flash of Invisible Textual content (FOIT) and Flash of Unstyled Textual content (FOUT) can happen when customized net fonts load. With FOIT, the textual content is invisible till the principle font masses. However the house taken up is predicated on the fallback font (which can be styled in a different way to the font you wish to present), that means the structure can shift.
Whereas FOUT reveals textual content in a fallback font after which switches to the net font as soon as it masses. If the 2 fonts are sufficiently completely different in type, it could possibly have an effect on the structure of different components.

Improperly Carried out Animations
Sure CSS properties can result in sudden structure shifts in the event you don’t use them accurately. Sometimes, these are properties like “box-shadow” and “box-sizing,” together with “high” and “left.”
Some properties can set off a re-layout of a web page. Whereas others can result in structure shifts even when the factor that shifts is by itself layer.
Find out how to Enhance Your Cumulative Format Shift Rating
Enhancing your CLS rating can present customers with a greater expertise. And it may affect your rankings too. Listed here are just a few methods to do that:
Specify Picture Dimensions
All the time set width and top attributes in your photos, video embeds, and different media. This tells the browser how a lot house to order for these components.
Defining these dimensions lets the browser allocate house within the doc structure earlier than the picture or video absolutely masses. Minimizing sudden structure shifts.
Let’s say you add a web site banner for desktop customers. If the banner’s picture dimensions are 1200 x 400 pixels, add the code beneath to your web site HTML code:
<img src="banner.jpg" width="1200" top="400" alt="Instance banner picture.">
Use CSS Side Ratio Containers
Implement side ratio containers in your CSS to keep up the identical width-to-height ratio no matter display measurement. This ensures your content material scales with out structure shifts. Supreme for cell responsiveness.
Side ratio containers work by making a container with a predefined measurement ratio. This prevents the content material from increasing or contracting in a means that might shift different web page components.
To create a responsive side ratio field for a video, you possibly can use one thing like this:
.video-container {
place: relative;
padding-bottom: 56.25%;
top: 0;
}
.video-container iframe {
place: absolute;
high: 0;
left: 0;
width: 100%;
top: 100%;
}
The above code retains your video in a chosen space of your webpage and maintains its correct form. It will not shift or trigger structure modifications as your web page masses.
A extra fashionable method (on fashionable browsers that help it) could be one thing like this:
.video-container {
aspect-ratio: 16 / 9;
width: 100%;
}
.video-container iframe {
width: 100%;
top: 100%;
}
Reserve House for Dynamic Content material
Anticipate and reserve house for dynamic content material like adverts to forestall them from pushing content material round after they load. When the dynamic content material masses, it suits into the allotted house with out affecting the structure of different web page components.
For instance, in the event you plan to show an advert on the high of an article, embody a placeholder the identical measurement because the advert.
Add a div factor the place you need the advert to seem in your article. Give this div an ID or class you may confer with in your CSS. Like this:
<div id="ad-placeholder"></div>
Place this div on the high of your article the place the advert will load.
Use CSS properties to specify the scale of this placeholder. Guarantee these dimensions match the advert measurement that may load on this house. For instance, if the advert is 728 x 90 pixels, add the next CSS code:
#ad-placeholder {
width: 728px;
top: 90px;
background-color: #f0f0f0;
}
The above CSS code will make the placeholder div occupy the quantity of house meant for the advert earlier than it masses. The background colour is a visible cue to inform the consumer that one thing will seem there.
To make it responsive, use percentages for width and preserve the side ratio with padding. Sometimes, adverts have mounted sizes relying on the gadget.
Use media queries to regulate the placeholder’s measurement based mostly on the display measurement. This manner, your placeholder adapts to numerous display sizes however stays prepared for a particular advert measurement when considered on bigger screens.
#ad-placeholder {
width: 100%;
top: 0;
padding-bottom: 12.5%;
background-color: #f0f0f0;
}
@media (min-width: 768px) {
#ad-placeholder {
width: 728px;
top: 90px;
padding-bottom: 0;
}
}
Keep away from Including New Content material Above Present Content material
Including content material above what’s at present on the display can push every little thing down, disrupting the consumer’s studying or shopping circulate.
As an alternative of dynamically inserting a promotional banner on the high of a web page the consumer is viewing, think about including it to a bit the consumer hasn’t scrolled to but. Or, insert it after a consumer motion, like clicking a button.
Deal with Fonts Correctly to Forestall FOIT/FOUT
Reduce the influence of net fonts by preloading important fonts and utilizing the font-display CSS function to regulate how and when fonts show.
Preload fonts and set font-display to “elective” to cut back the probability of textual content being invisible (FOIT) or abruptly altering type (FOUT). The “elective” show attribute lets the browser select to make use of a fallback font in case your principal font takes too lengthy to load.
To preload crucial net fonts, use a line of code like this:
<hyperlink rel="preload" href="https://instance.com/fonts/mywebfont.woff2" as="font" kind="font/woff2" crossorigin>
Use the next in your CSS to make sure the textual content stays seen throughout font loading and forestall structure shifts:
@font-face {
font-family: 'MyWebFont';
src: url('/mywebfont.woff2') format('woff2');
font-display: elective;
}
Use the Remodel CSS Property for Animations
Lastly, in the event you discover animations are resulting in poor CLS scores, think about using the “rework” CSS property. This allows you to animate components on the web page with out resulting in sudden structure shifts.
As with including picture dimensions, that is one thing your web site builder may do for you. But when not, you should use “rework: scale()” as an alternative of adjusting the peak and width properties.
And you may transfer components round with “rework: translate(). Reasonably than altering the highest, proper, backside, or left properties.
Enhance Your CLS Rating with Semrush
Semrush’s Web site Audit device identifies your web site’s CLS points and supplies tailor-made recommendation to enhance your Cumulative Format Shift rating. And it does the identical for different Core Net Vitals too.
Plus, working subsequent audits at common intervals lets you monitor enhancements over time.

Attempt Web site Audit as we speak to entry a complete efficiency report with over 140 on-page and technical search engine marketing checks.
This publish was up to date in 2024. Excerpts from the unique article by Luke Harsel might stay.