The Document Object Model (DOM) is a platform- and language-independent interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents.
The HTML DOM defines a standard way for accessing and manipulating HTML documents.
The DOM is a W3C (World Wide Web Consortium) standard.The DOM defines the objects and properties of all document elements, and the methods (interface) to access them.
In simple words : The HTML DOM is a standard for how to get, change, add, or delete HTML elements.
According to the DOM, everything in an HTML document (layout) is a node.
DOM says that:
- The entire document is a document node
- Every HTML element is an element node
- The text in the HTML elements are text nodes
- Every HTML attribute is an attribute node
- Comments are comment nodes