What is DOM? What is the use of document object?
DOM stand for Document Object Model. It primarily deals with the document, as well as the HTML elements themselves, such as document and all traversal that can be done in it, such as events, etc.
It can be said that DOM is a subset of BOM, as each HTML page which is loaded into a browser window becomes a Document object. Also, document object is an object in BOM.
DOM defines the logical structure of documents. It defines how document is accessed and manipulated. DOM can also be used to create and build documents, as well as navigate their structure, and add, modify, or delete elements and content. Nearly anything that can be found in the an HTML or XML document can be accessed, changed, deleted, or added by using DOM.