Critical CSS: The Decisions That Matter
Delivering the styles needed to render the visible part of the page immediately, often inline in the HTML, and loading the rest of the CSS without blocking rendering.
On this page
The key figures
- Render blocking
- stylesheets in the head block rendering until they download and parse
- Critical CSS
- the styles for above-the-fold content
- Media attributes
- stylesheets for other media, such as print, do not block rendering
- Risk
- inlining too much CSS delays the HTML itself
Why this is worth getting right
The browser will not paint anything until it has the CSS in the head, so large stylesheets delay the first view of every page.
Do this, not that
Do
- Extract and inline critical CSS for key templates
- Load the full stylesheet without blocking render
- Remove unused CSS from large frameworks
- Keep inlined CSS small
- Check for layout shifts when full styles arrive
Don’t
- Inlining the entire stylesheet
- Several render-blocking stylesheets from different sources
- Loading icon fonts before content styles
- Critical CSS that falls out of date after redesigns
When to bring in help
Our advice Bring in help when First Contentful Paint is slow and stylesheets are the main render-blocking resource.
Where this comes from
- web.dev — Extract critical CSS
- MDN Web Docs — Critical rendering path
The figures and practices above come from the sources listed.
Working on something like this?
We take on Performance & Accessibility work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.
Where to go next
Spotted something wrong? Report an error on this page. We correct on the page and say what changed.