What is DOM?DOM which is short for Document Object Model , is the specification for how objects in a web page should appear. It is an interface that allows a programming language to manipulate the content, structure, and style of a website. When a web page is loaded, the browser creates a Document Object Model of that page. In the DOM, documents have a logical structure which is very much like a tree. For example, the opening tag is the root, and all tags within it are its nodes and so on. The DOM is browser independent as well as platform independent and it achieves this independence by representing the contents of the web document as a generic tree structure . It is governed by its own standard, maintained by the W3C (World Wide Web Consortium).
HTML and DOMHTML you write is parsed by the browser and turned into the DOM. Dynamic web pages relies on the DOM to dynamically change the appearance of Web pages after they have been downloaded to a user's browser. DOM does not define what information in a document exists and how the document is structured or implemented. It represents a web document or a web page, that allows developers a way of representing everything on a web document so that it is accessible via a common set of properties and methods . Anything found in an HTML document can be accessed, changed, deleted, or added using the Document Object Model.