---
title: DOM (Document Object Model)
slug: Glossary/DOM
tags:
  - CodingScripting
  - DOM
  - Glossary
---
The **DOM** (Document Object Model) is an {{glossary("API")}} that represents and interacts with any {{glossary("HTML")}} or {{glossary("XML")}} document. The DOM is a document model loaded in the {{glossary("browser")}} and representing the document as a node tree, where each node represents part of the document (e.g. an {{Glossary("element")}}, text string, or comment).

The DOM is one of the most-used {{Glossary("API")}}s on the {{glossary("World Wide Web","Web")}} because it allows code running in a browser to access and interact with every node in the document. Nodes can be created, moved and changed. Event listeners can be added to nodes and triggered on occurrence of a given event.

DOM was not originally specified—it came about when browsers began implementing {{Glossary("JavaScript")}}. This legacy DOM is sometimes called DOM 0. Today, the WHATWG maintains the DOM Living Standard.

## See also

- {{interwiki("wikipedia", "Document_Object_Model", "The Document Object Model")}} on Wikipedia
- [The DOM documentation on MDN](/en-US/docs/Web/API/Document_Object_Model)
- [The DOM Standard](https://dom.spec.whatwg.org/)
- [Glossary](/en-US/docs/Glossary)

  - {{Glossary("API")}}
  - {{Glossary("HTML")}}
  - {{Glossary("XML")}}
  - {{Glossary("World Wide Web")}}
