render tree
The tree of visible elements with their computed styles, built from the DOM and CSSOM, that the browser uses for layout and painting.
In more detail
The browser walks the DOM from the root, skips non-visual elements such as head, script and meta, and drops anything with display: none together with its descendants. Elements with visibility: hidden stay in the tree because they still take up space.
Related terms
- DOM — The tree of objects a browser builds from a web page, which scripts read and change to update what is on screen.
- CSSOM — The browser's in-memory model of all the CSS rules on a page, built by parsing stylesheets, which it combines with the DOM to work out each element's style.
- layout — The rendering stage in which the browser calculates the exact position and size of every box on the page.
- display: none — The CSS declaration that removes an element and all its descendants from the render tree, so it takes no space and is not drawn.
- visibility: hidden — The CSS declaration that makes an element invisible while keeping it in the layout, so it still takes up its space.
Taught in
- CSS Parsing, The CSSOM And The Render Tree — Frontend Architecture & Web Platform
- Critical Rendering Path: Preload, Prefetch And Scripts — Frontend Architecture & Web Platform