🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Web Development Beginner

What is DOM (Document Object Model)?

A programming interface for HTML documents that represents the page structure as a tree of objects that can be manipulated with JavaScript.

The DOM represents HTML as a tree of nodes. JavaScript can read, modify, add, and remove elements: document.getElementById("id"), element.innerHTML, document.createElement("div"), parent.appendChild(child). Events (click, submit, keypress) trigger JavaScript functions.

Direct DOM manipulation is slow for complex updates. Modern frameworks (React, Vue) use a Virtual DOM — an in-memory representation that calculates minimal changes before updating the real DOM. Understanding the DOM is fundamental to frontend development.

Related Terms

Web Components
A set of browser-native APIs for creating reusable, encapsulated custom HTML elements with their own styling and behavior.
Cross-Origin Resource Sharing (CORS)
An HTTP mechanism that allows web pages to request resources from a different domain than the one serving the page.
HTTP/2
The second major version of HTTP that improves performance through multiplexing, header compression, and server push.
Static Site Generator (SSG)
A tool that generates a complete static HTML website from templates and content at build time, requiring no server-side processing.
WebSocket
A communication protocol that enables full-duplex, real-time data exchange between a browser and server over a single connection.
CSS Flexbox
A CSS layout model that provides efficient arrangement of items within a container, handling alignment, distribution, and spacing.
View All Web Development Terms →