Document Object Model
The DOM represents an HTML document as a structured tree of nodes that can be manipulated programmatically. After the browser reads an HTML document, it constructs a DOM tree in memory. The DOM provides a standardized API that allows JavaScript to access and update the contents, structure and style of a document.
It helps a developer to add actions on the certain events while the visitor is interacting.
Note-
I am giving a link of a very useful chrome extension which will help you to see the whole source code of your website in the form of structured tree.
This will help you to easily navigate.