What Is Document Object Model? Explained In One MinutePosted by TotalDC
The Document Object Model (DOM) is the data representation of the objects that comprise the structure and content of a document on the web. In this guide, I’ll briefly introduce the DOM.
From code to your screen
First lets see how a web page is built. How a browser goes from a source HTML document to displaying a styled and interactive page in the viewport is called the Critical Rendering Path. The first stage involves the browser parsing the document to determine what will ultimately be rendered on the page, and the second stage involves the browser performing the render. The result of the first stage is what is called a render tree. The render tree is a representation of the HTML elements that will be rendered on the page and their related styles. In order to build this tree, the browser needs two things – the CSSOM, a representation of the styles associated with elements and the DOM, a representation of the elements.
So what is Document Object Model (DOM)?
- DOM is always valid HTML
- It doesn’t include pseudo-elements
- It doesn’t include hidden elements
Leave a Reply