On this page
  1. Critical Rendering Path
  2. Contents
  3. HTML + CSS to Pixels Pipeline
  4. Render-Blocking Resources

Critical Rendering Path

Prev: rendering | Up: rendering | Next: Reflow, Repaint & Performance
Rel: Document & Landmarks, Cascade, Specificity & Inheritance, Reflow, Repaint & Performance
Ref: MDN Web Docs — Critical Rendering Path
Tags: #public #web #platform #rendering


Contents


HTML + CSS to Pixels Pipeline

Every frame the browser renders follows six stages:

HTML bytes -> Parse -> DOM Tree  ──┐
                                   ├──> Render Tree -> Layout (Reflow) -> Paint -> Composite
CSS bytes  -> Parse -> CSSOM Tree ─┘
  1. DOM: HTML bytes are tokenized into the Document Object Model tree.
  2. CSSOM: CSS rules are parsed into the CSS Object Model; the cascade resolves computed styles.
  3. Render Tree: Combines visible DOM nodes with their CSSOM computed styles (omitting display: none and <head>).
  4. Layout (Reflow): Calculates exact box geometry (position & dimensions) in viewport coordinates.
  5. Paint: Rasterizes text, colors, borders, and shadows into layer bitmaps.
  6. Composite: GPU composites layers in stacking order onto the screen.

Render-Blocking Resources

Linked from

Related notes