Document Object Model
The DOM (Document Object Model) is an API (Application Programming Interface) for HTML and XML documents. 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. 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.
The DOM (Document Object Model) represents a document as a hierarchical tree structure and each element in the document tree is called a Node in the DOM. The main object in the tree structure is the Document Object, which in turn contains several other child objects. Also several properties of the document object include information about the current document in general. For e.g. document.title represent the title of the current page, defined by the HTML < title > tag.