Document Object Model or DOM is the W3C (World Wide Web Consortium) standard for accessing documents used as standard for programming interface for HTML.
- HTML elements of the webpage as objects
- methods for accessing all the HTML elements
- properties of all the HTML elements
- The events for all the HTML elements
You can also access the Document Object of a website on your browser (for Google Chrome):
- Right Click and click on inspect element.
- Click on console.
- If there are many messages, ignore them or click ctrl+l (windows) or cmd+l (macOS) to clear them.
- Now, type console.log(window) and press enter/return.
The browser will return the window object, which represents a window containing a DOM document. You can find the attributes, location (URL etc.) of the website in this window object.