Summary
The Document Object Model (DOM) is an API defined by the W3C to represent and interact with any HTML or XML document.
In Depth
The Document Object Model is one of the most used {{Glossary("API")}} on the web as it allows to access every single part of an {{Glossary("HTML")}} or {{Glossary("XML")}} document and interact with it. This model represents an {{Glossary("HTML")}} document as it would have been a tree of nodes, where each node represents a portion of the document whether it's an {{Glossary("element")}}, a portion of text or a comment. Nodes can be created, moved, changed, and events that occured on them can be listened to and then acted on (reaction to the event).
The early version of the DOM were not specified and came from the first {{Glossary("Browser","browsers")}} implementing {{Glossary("JavaScript")}}. This legacy DOM is sometime refered as DOM 0. Today, the DOM specification is lead by the {{Glossary("W3C")}} and the DOM Working Group is currently working on the fourth version of the DOM specification.