Encyclopedia / HTML

DOM

The live tree the browser builds from HTML.

The Document Object Model is the in-memory version of the page. CSS styles it, JavaScript reads and changes it, and DevTools' Elements panel shows it. The HTML file is the recipe and the DOM is the finished dish, which scripts can keep changing.

Related terms

HTML document JavaScript

Where it shows up in a page load

  1. Step 8: Parse HTML → DOM. The browser reads the HTML from top to bottom and builds the DOM, a tree of every element. Along the way it finds the CSS, JavaScript, fonts and images and requests them. Many of those requests run in parallel.

Watch the full request journey →

More in HTML

The document itself: what each piece of content is.

HTML document <head> Semantic HTML

Open in the interactive encyclopedia →