Preparing your workspace
Browsers parse document and style information and use the resulting structures to calculate and render the page.
The browser parses HTML into a document structure and processes CSS rules to determine how elements should look. It then performs layout calculations and paints the result to the screen. JavaScript can modify the document or styles and may cause additional browser work. Developers do not need to memorize every internal rendering step, but understanding that parsing, style calculation, layout, and painting are separate concerns helps explain performance issues.
A page with large images, complex CSS, and heavy JavaScript may take longer to become visually usable because multiple stages of loading and rendering are involved.
HTML ↓ DOM CSS ↓ Styles DOM + Styles ↓ Layout ↓ Paint ↓ Visible Page
The browser combines document structure and styling information to calculate and render the visible page.