Browser Rendering Process
Browser Rendering Process The browser rendering process is how a browser takes the HTML, CSS, and JavaScript of a webpage and turns it into pixels that we see on the screen. This involves multiple steps, including parsing , rendering , and handling updates like repaints, reflows, and composition. Let’s go through this process step by step in simple terms. Step 1: Parsing the HTML HTML Parsing: The browser reads the HTML code line by line and converts it into a structure called the DOM Tree (Document Object Model). Example: < div > < h1 > Hello </ h1 > < p > World </ p > </ div > The DOM Tree looks like: < html > < body > < div > < h1 >Hello</ h1 > < p >World</ p > </ div > </ body > </ html > CSS Parsing: The browser reads the CSS and creates a CSSOM Tree (CSS Object Model), which represents the styles applied to each element. Example: h1 { color : red; }...