A browser does not simply read HTML from top to bottom and draw a finished page. It builds several representations, coordinates multiple threads and processes, and repeatedly updates parts of the result.

This article is part of the software engineering technologies guide library.

From source to structure

HTML becomes a document tree while CSS rules become a style model. The browser combines them to determine which visible nodes need boxes and how those boxes should look.

Layout and paint

Layout calculates geometry. Paint records drawing operations such as text, borders, and backgrounds. Compositing assembles rasterised layers into the final frame.

Why performance changes

JavaScript, font loading, image dimensions, animations, and DOM changes can trigger different parts of the pipeline. Stable dimensions and transform-based motion generally reduce avoidable layout work.

AM

About the author

Arjun Mehta

Security & Software Editor

Cybersecurity, developer tooling, open-source software, and cloud systems.

No vendor-sponsored conclusions or affiliate relationships.
Version 2

Image updated: embedded writing removed; article content and factual claims unchanged.