Critical CSS Explained for Small Business Sites
Before a browser can show a page, it usually waits for the stylesheets in the head. If those files are large, the visitor sees a blank screen while they download. Critical CSS is a technique to reduce that wait by including only the styles needed for the first view directly in the page.
The problem it solves
A normal stylesheet is render-blocking: the browser will not paint the page until it has the CSS, because showing unstyled content would be jarring. For a large stylesheet on a slow connection, this can noticeably delay the first paint. See render-blocking resources explained.
How critical CSS works
- Identify the styles needed to display what is visible without scrolling, often called above the fold.
- Put those rules in a
styleelement in the head of the page, so they arrive with the HTML. - Load the rest of the stylesheet in a way that does not block the first paint.
The visitor sees a styled first view quickly, and the remaining styles arrive shortly after.
When it helps
- Large stylesheets, especially from themes or frameworks
- Pages where the first screen is simple and predictable
- Visitors on slow mobile connections
- Landing pages, where first impressions matter. See landing page best practices
When it may not be worth it
- If your stylesheet is already small, the gain may be tiny
- If you use a content management system with many page types, maintaining critical CSS for each can be fiddly
- If your server is slow, fix that first. See what is TTFB
- If your main delay is images or scripts, address those first
Risks to watch
- Flash of unstyled content: if too little CSS is included, the page may jump when the rest loads
- Layout shift: styles arriving late can move things around. See how to fix Cumulative Layout Shift
- Duplicated rules: the same CSS exists in two places, so changes must be kept in sync
- Stale CSS: if the design changes, critical CSS must be regenerated
How to generate it
Many build tools, caching plugins, and performance services can generate and inline critical CSS automatically. On a hand-built or static site, small stylesheets can often be inlined entirely, which is the simplest approach. Check what your platform or host offers before building your own.
Other ways to make CSS lighter
- Remove unused styles
- Minify the file. See minify CSS and JavaScript
- Compress it on the server. See Gzip and Brotli compression
- Cache it well. See browser caching explained
- Avoid chains of imports
Test the result
Compare before and after on a throttled mobile profile, and look at how the page appears frame by frame. Make sure nothing jumps. See how to test website speed.
Common mistakes
- Inlining too much
- Forgetting to update it after design changes
- Doing it before fixing bigger problems
You can also tell the browser to fetch key files early. See preload, preconnect, and prefetch explained.