Advanced
HTML & CSS
Q82 / 100
What is the difference between "reflow" and "repaint" in browser rendering, and why does this matter for performance?
Correct! Well done.
Incorrect.
The correct answer is B) Reflow (layout) recalculates element geometry/position (triggered by changes like width or display), while repaint redraws pixels without changing layout (e.g. color); reflow is costlier and often triggers a repaint too
B
Correct Answer
Reflow (layout) recalculates element geometry/position (triggered by changes like width or display), while repaint redraws pixels without changing layout (e.g. color); reflow is costlier and often triggers a repaint too
Explanation
Layout-affecting changes (reflow) are costlier because they may cascade to affect many elements' positions/sizes, while paint-only changes are cheaper; minimizing layout thrashing (frequent reflows) is a key performance technique.
Progress
82/100