DOM (Document Object Model)
The browser's live map of your webpage.
Definition
The Document Object Model is how the browser represents your HTML as a tree of objects. Every element — every heading, paragraph, button — becomes a node that JavaScript can read and change. When you edit text in the editor and see it update in the preview, the DOM is what changes.
Example
document.querySelector('h1').textContent = 'New Title' finds the h1 node in the DOM tree and changes its text. The page updates instantly without reloading.
See it in context Learn how DOM fits into the bigger picture of how software actually works.
Read the Guide →