Skip to content
IT glossary
FrontendUpdated December 3, 2026

Browser rendering

Рендеринг в браузере

Browser rendering turns a page’s HTML and CSS into pixels on the screen. When the page changes, the browser updates the frame without necessarily repeating every step.

Also known as: critical rendering path, reflow, repaint

From a document to a frame

HTML tells the browser what is on the page, and CSS tells it how the page should look. Rendering is the work of turning those instructions into a visible frame. It happens on the initial load and again as needed, for example when a menu opens or a window resize changes how text wraps.

What the browser does

  1. Parse HTML and CSS. The browser builds the DOM, a tree of document nodes, and represents the stylesheet rules in the CSS Object Model (CSSOM).
  2. Resolve styles. The browser works out which styles apply to each element using selector matching, the cascade, and inheritance.
  3. Run layout. Also called reflow, this step calculates the size and position of boxes. If a headline wraps onto another line, layout determines where the content below it goes.
  4. Paint and rasterize. Paint determines what to draw and in what order, including backgrounds, borders, and text. Rasterization turns those drawing instructions into pixels.
  5. Composite. The browser puts the rendered layers together to produce the frame.

Not every change needs every stage. A new text color usually needs a repaint but no layout. Moving an element with transform can be cheaper than changing left: if the browser can reuse the pixels of a composited layer, it can move the layer without laying it out or repainting it on each frame.

Example: when a measurement forces layout

panel.classList.add('expanded');
const height = panel.getBoundingClientRect().height;

The class change might make the panel taller. The browser can normally defer the work, but the measurement must reflect the current geometry. If layout is out of date, the browser has to update it before returning the height. One measurement may be fine; alternating writes and measurements for dozens of panels can force repeated layouts. If you need all the final heights, expand the panels first, then measure them in a separate pass.

First paint and later updates are different problems

The critical rendering path is the work needed to get from the initial document and its required resources to the first visible output. A stylesheet that applies to the page can delay that first paint. If the page loads quickly but a menu animation stutters, look at a browser performance recording instead of assuming the network is to blame. The recording can show whether the main thread is busy running JavaScript, recalculating styles, or doing layout and paint work.

A framework's use of the word render is different. React can compute the next version of a component without changing the DOM, so a React render does not necessarily trigger a browser repaint.

What interviewers look for

Expect to reason about a specific update, not just name the stages. For example, changing a card's width can move its neighbors and require layout; changing its background color usually does not. Explain why, then say how you would verify the difference in a performance trace. The browser does not necessarily redo layout for the whole page.