critical CSS
The small subset of CSS needed to draw the first screen of a page, often inlined in the HTML so rendering is not blocked by a stylesheet download.
In more detail
The rest of the CSS loads without blocking. This shortens the critical rendering path and improves Largest Contentful Paint.
Related terms
- critical rendering path — The sequence of steps from receiving HTML, CSS and JavaScript to drawing the first pixels: build the DOM and CSSOM, the render tree, layout and paint.
- render-blocking resource — A file, usually a stylesheet in the head or a synchronous script, that the browser must finish loading before it will draw the page.
- Largest Contentful Paint — A Core Web Vital: the time from starting to load a page until its largest visible image or text block is drawn.
Taught in
- Critical Rendering Path: Preload, Prefetch And Scripts — Frontend Architecture & Web Platform
- Core Web Vitals: Measuring And Optimizing LCP, INP, And CLS — Frontend Architecture & Web Platform