The critical rendering path is the sequence of steps the browser takes to turn HTML, CSS, and JS into pixels. Understanding it explains what blocks rendering and how to make pages paint faster.
The steps
1. Parse HTML → DOM tree (the document structure)
2. Parse CSS → CSSOM tree (the style rules)
3. DOM + CSSOM → Render tree (visible nodes + their styles)
4. Layout (reflow) → compute each node's geometry (position/size)
5. Paint → fill in pixels (colors, text, images)
6. Composite → combine layers onto the screen
What blocks rendering
The browser won't paint until the CSSOM is ready (to avoid a flash of unstyled content). So large/slow CSS delays first paint — keep critical CSS small and inline it when possible.
