The browser has received an HTML response from the server. Now it needs to turn that raw text into pixels on the screen. Without a rendering pipeline, the user would just see a blank page or raw HTML source.
Browser rendering is the multi-step pipeline that converts HTML, CSS, and JavaScript into visible pixels: parsing → style calculation → layout → paint → composite. Each step transforms the content into a more rendered form.
- HTML Parsing: Build DOM tree from HTML
- CSS Parsing: Build CSSOM (CSS Object Model) from stylesheets
- Render Tree: Combine DOM + CSSOM (only visible elements)
- Layout: Calculate position and size of each element
- Paint: Fill in pixels for each element
- Composite: Combine layers and send to GPU for display
Modern browsers use GPU acceleration for steps 5-6.
- Render-blocking: CSS blocks rendering (no paint without styles)
- JavaScript can block HTML parsing (unless
async/defer) - Layers enable GPU-accelerated compositing
- Reflow (layout recalculation) is expensive—avoid in loops
- Built from: HTTP Response — HTML response triggers rendering
- Builds into: DOM Tree — first step of rendering
- Related: CSS Parsing — builds CSSOM
- Related: GPU Rendering — accelerates painting/compositing
- Related: Layout — calculates element positions
- FOUC (Flash of Unstyled Content) if CSS loads slowly
display: noneremoves element from render treevisibility: hiddenkeeps element in render tree (takes space)- Forced synchronous layout (reading layout properties in JS) is slow