Interview Question

How does browser rendering work?

Rendering moves from parsing to style, layout, paint, and compositing.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

Browser rendering turns downloaded resources into the pixels and interactive controls shown to the user. • The browser parses HTML into the DOM and CSS into style information. • It calculates styles and layout, then paints and composites visual layers. • JavaScript, fonts, images, and later DOM changes can trigger more rendering work.

💡 Simple Example

<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Rendered page</title></head><body><h1>Hello</h1><p>The browser turns this markup into a visible page.</p></body></html>

⚡ Quick Revision

Rendering moves from parsing to style, layout, paint, and compositing.