The Document Object Model (DOM)

The Document Object Model, or DOM, is the in-memory representation of a web page that a browser builds from HTML. It models the document as a tree of nodes, where elements, text, and attributes become objects that a program can navigate and modify. When a script changes a node in this tree, the browser updates what the user sees, which is what makes pages interactive rather than static.

The DOM was standardized by the W3C. The DOM Level 1 specification reached W3C Recommendation status on October 1, 1998, and defines, in its own words, “a platform- and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure and style of documents.” The specification is split into a Core part that covers structured documents generally and an HTML part with higher-level interfaces specific to HTML pages.

The DOM matters because it is the bridge between markup and code. JavaScript running in a page does not edit HTML text directly; it manipulates DOM objects, and the browser re-renders accordingly. This model made possible the dynamic interfaces of the modern Web, from early scripted menus through AJAX-driven updates to full single-page applications.

Because direct DOM manipulation can be verbose and slow when overused, later libraries and frameworks such as jQuery and React were built largely to make working with the DOM easier and more efficient, but they all ultimately operate on the same tree the W3C defined.

Sources

Last verified June 7, 2026