How Much Inlining Critical CSS Shortens the Core Web Vitals LCP
When I inlined only the CSS needed for the first screen (critical CSS) in a <style> tag in the HTML and loaded the rest of the CSS later, the first-load LCP (Largest Contentful Paint) on the tested page was less than half of the original. On a connection limited to 1.6Mbps with a 150ms round-trip time, the median LCP was 484ms for the page that loaded the CSS file with a <link> tag and 192ms for the page that inlined only the critical CSS.
These results are useful when PageSpeed Insights or Lighthouse reports that CSS is blocking rendering and you want to reduce LCP. However, the difference disappeared on a second visit, when the CSS was already cached by the browser. Also, inlining all of the CSS was slower than inlining only the critical CSS. When I left the card styles for the first screen in a CSS file that loaded later, CLS (Cumulative Layout Shift) was 0.0553. When I inlined those styles too, CLS dropped to 0.
The test environment was Ubuntu 24.04 (4 CPUs), Node.js 22.23.5, web-vitals 6.2.3, and Playwright 1.63.0. I used the headless Chromium 158 bundled with Playwright. The pages were served from a Node.js http server on the same VM, using HTTP/1.1 and gzip. I simulated network speed and latency with the Chrome DevTools Protocol's Network.emulateNetworkConditions. This method delays each request. It does not delay packets the way a real network does. Each condition is the median of 7 runs. I did not test HTTP/2 or HTTP/3, traffic over the real internet, pages where an image is the LCP element, tools that extract critical CSS automatically, or real smartphones.
Three pages compared
The test page is HTML with a header, a heading, a lead paragraph, and 120 cards below them. In every run, the LCP element was the lead paragraph (#lead) below the heading.
The CSS totals 164,560 bytes (26,567 bytes with gzip). The seven lines (458 bytes) needed for the first screen cover the header, heading, lead paragraph, and so on. The rest is the card styles. I prepared three pages that differ only in how this CSS is loaded:
| Page | How the CSS is loaded | HTML transfer size |
|---|---|---|
| Load CSS file | <link rel="stylesheet" href="/style.css"> |
2,002 bytes |
| Inline critical CSS only | The seven lines go in a <style> tag, and the rest (rest.css) loads later |
2,383 bytes |
| Inline all CSS | All 164,560 bytes go in a <style> tag |
28,709 bytes |
The <head> of the page that inlines only the critical CSS is shown below.
<style>
*{box-sizing:border-box}
body{margin:0;font-family:"Noto Sans CJK JP",sans-serif;color:#1f2a30;background:#fff}
.site-header{height:56px;padding:0 16px;display:flex;align-items:center;background:#eefafd;border-bottom:1px solid #cdeef6}
.site-header .logo{font-weight:700;color:#067a98;font-size:18px}
main{max-width:720px;margin:0 auto;padding:16px}
h1{font-size:28px;line-height:1.4;margin:24px 0 12px}
.lead{font-size:18px;line-height:1.9;margin:0 0 24px}
</style>
<link rel="preload" href="/rest.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/rest.css"></noscript>
The way rest.css loads follows the web.dev article on deferring non-critical CSS. It uses rel="preload" to fetch the CSS without blocking rendering, then changes rel to stylesheet in the onload handler once the file has loaded, which applies the styles.
The server returned the HTML with Cache-Control: no-cache and the CSS with Cache-Control: public, max-age=3600. Each Chromium run started in a new context with an empty cache. I call the first load in a context the "first load." I call the next load of the same page in the same tab the "second load." The screen size was 412×823. I recorded LCP and the other metrics with the attribution build of web-vitals.
I used three network conditions: 1.6Mbps with a 150ms round-trip time, 10Mbps with a 40ms round-trip time, and no throttling. For 1.6Mbps with a 150ms round-trip time, I matched the default mobile simulation values in Lighthouse's throttling documentation: 150ms round-trip time and 1,638.4Kbps. According to the same document, when Lighthouse throttles the connection in the DevTools mode, it uses a 562.5ms round-trip time and 1,474.56Kbps. The conditions in this test are lighter than that.
On the first load, LCP dropped from 484ms to 192ms

| Page | 1.6Mbps first load | 1.6Mbps second load | 10Mbps first load | 10Mbps second load | No throttling, first load |
|---|---|---|---|---|---|
| Load CSS file | 484ms | 192ms | 152ms | 76ms | 48ms |
| Inline critical CSS only | 192ms | 192ms | 80ms | 80ms | 48ms |
| Inline all CSS | 320ms | 308ms | 112ms | 92ms | 52ms |
On the first load at 1.6Mbps, inlining only the critical CSS reduced the median LCP by 292ms. The range over 7 runs was 480–488ms for the page that loads the CSS file and 188–204ms for the page with inlined CSS. The ranges do not overlap. On every page, FCP (the time the first content appeared) and LCP had the same value. The lead paragraph appeared together with the first content on the page.
The page that loads the CSS file has a slow LCP because rendering stops until style.css arrives. At 1.6Mbps, the HTML finished arriving at 164ms, but style.css (26,867 bytes transferred) finished arriving at 449ms. The LCP of 484ms came right after that. On the page with the inlined critical CSS, the lead paragraph appeared at 192ms, shortly after the HTML finished arriving at 163ms.
On the first load at 10Mbps, the value dropped from 152ms to 80ms, which is roughly half. Without throttling, all pages were between 48ms and 52ms, with no meaningful difference. On the same VM, style.css also finished arriving in about 13ms.
On the second load, with the CSS cached, the difference disappeared
On the second load in the same tab, the LCP of the page that loads the CSS file was 192ms at 1.6Mbps and 76ms at 10Mbps. style.css was read from the cache, and its transfer size was 0 bytes. These values are almost the same as those for the page with inlined critical CSS (192ms and 80ms).
The web.dev article on critical CSS notes that when CSS is inlined, the browser cannot cache and reuse that CSS for later page loads. With the approach that inlines only the critical CSS, only 458 bytes are inlined. On the second load, rest.css had a transfer size of 0 bytes and was read from the cache. The second-load LCP was within 4ms of the page that loads the CSS file.
Inlining all CSS is slower because the HTML takes longer to arrive
The page that inlined all CSS in a <style> tag had an LCP of 320ms on the first load at 1.6Mbps. That is faster than the page that loads the CSS file (484ms), but 128ms slower than the page that inlined only the critical CSS (192ms).
The HTML transfer size grew to 28,709 bytes. At 1.6Mbps, it took 292ms for the HTML to finish arriving (163ms for the page that inlined only the critical CSS). The lead paragraph is located in the HTML after the <style> tag, and the LCP of 320ms came after this HTML had finished arriving. The web.dev article on critical CSS also explains that inlining a large amount of CSS delays the delivery of the rest of the HTML.
On the second load, this page took 308ms at 1.6Mbps. Because the HTML is not cached, it had to download all 28,709 bytes again each time. That is 116ms slower than the second load of the page that loads the CSS file (192ms). Among the three pages, the second load of this page was the slowest.
Loading the card styles later caused CLS
On the first load with throttling, the page that inlined only the critical CSS had a CLS of 0.0553 in all 7 runs. The other two pages had a CLS of 0 in every run.
I delayed only rest.css by 2 seconds and took screenshots. Before the file arrived, the cards were displayed as text stacked vertically (display: block). When rest.css was applied, the cards changed to a bordered horizontal layout (display: grid), and .card-1 and .card-2, which were visible on screen, moved. The only layout shift I recorded was this one (0.0553).

I cover in detail how loading CSS later increases CLS in an article that examines an example of this. Here I only report the results I used to decide how much CSS to inline to reduce LCP.
At 412×823, the cards from .card-0 to .card-2 were on screen when all the CSS was applied. So I made another page that also inlined the 15 lines of .card-0 through .card-4 styles, with a bit of extra margin, and measured it under the same conditions. The inlined CSS was 22 lines (1,796 bytes), and the HTML transfer size was 2,774 bytes.
| Network | LCP (first load) | LCP (second load) | CLS (14 runs across first and second loads) |
|---|---|---|---|
| 1.6Mbps, 150ms round-trip time | 192ms | 188ms | All 0 |
| 10Mbps, 40ms round-trip time | 80ms | 68ms | All 0 |
| No throttling | 48ms | 36ms | All 0 |
The LCP was the same as the page that did not inline the card styles (192ms on the 1.6Mbps first load), and CLS was 0 in all 42 runs. If you consider only the lead paragraph, the LCP element, 7 lines of inlined CSS are enough. However, if you do not also inline the card styles needed for the first screen, LCP still drops but CLS appears.





