<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How The Browser Works: A Beginners Guide]]></title><description><![CDATA[How The Browser Works: A Beginners Guide]]></description><link>https://how-the-browser-works-a-beginners-guide.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 08:39:04 GMT</lastBuildDate><atom:link href="https://how-the-browser-works-a-beginners-guide.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How The Browser Works: A Beginner-Friendly Guide to Browser Internals]]></title><description><![CDATA[What actually happens when we type a URL and press Enter?A webpage appears almost instantly - but behind the scenes, the browser is doing a lot of quiet work.
What a Browser Actually Is (Beyond “It Opens Websites”)
A browser is not just a window or a...]]></description><link>https://how-the-browser-works-a-beginners-guide.hashnode.dev/how-the-browser-works-a-beginner-friendly-guide-to-browser-internals</link><guid isPermaLink="true">https://how-the-browser-works-a-beginners-guide.hashnode.dev/how-the-browser-works-a-beginner-friendly-guide-to-browser-internals</guid><category><![CDATA[Working Of Working]]></category><category><![CDATA[How a Browser Works: A Beginner-Friendly Guide to Browser Internals]]></category><category><![CDATA[css parsing]]></category><category><![CDATA[html-parsing]]></category><dc:creator><![CDATA[Aayush Kumar]]></dc:creator><pubDate>Sun, 01 Feb 2026 12:52:25 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769947177511/3836f3c3-de46-4b63-9d5b-22bb8738fed8.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>What actually happens when we type a URL and press Enter?</strong><br />A webpage appears almost instantly - but behind the scenes, the browser is doing a lot of quiet work.</p>
<h2 id="heading-what-a-browser-actually-is-beyond-it-opens-websites">What a Browser Actually Is (Beyond “It Opens Websites”)</h2>
<p>A browser is not just a window or a tool for the internet.<br />It’s more like a translator + painter.</p>
<ul>
<li><p>It <strong>fetches</strong> files from the internet (HTML, CSS, JavaScript)</p>
</li>
<li><p>It <strong>understands</strong> what those files mean</p>
</li>
<li><p>It <strong>converts code into visuals</strong></p>
</li>
<li><p>It <strong>keeps updating the screen</strong> as things change</p>
</li>
</ul>
<p>In simple words:</p>
<blockquote>
<p>A browser’s real job is to turn code into something humans can see and use.</p>
</blockquote>
<h2 id="heading-the-main-parts-of-a-browser-high-level-view">The Main Parts of a Browser (High-Level View)</h2>
<p><img src="https://media2.dev.to/dynamic/image/width%3D800%2Cheight%3D%2Cfit%3Dscale-down%2Cgravity%3Dauto%2Cformat%3Dauto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe1jalr50iq0qbcljula7.png" alt="The components of a browser - DEV Community" class="image--center mx-auto" /></p>
<p>We can think of a browser as a small system where each part has some responsibility:</p>
<ul>
<li><p><strong>User Interface (UI)</strong> – what we interact with</p>
</li>
<li><p><strong>Browser Engine</strong> – coordinates everything</p>
</li>
<li><p><strong>Rendering Engine</strong> – draws the page</p>
</li>
<li><p><strong>Networking</strong> – fetches data from servers</p>
</li>
<li><p><strong>JavaScript Engine</strong> – runs JavaScript</p>
</li>
<li><p><strong>Storage</strong> – maintain cookies, cache, local storage</p>
</li>
</ul>
<h2 id="heading-user-interface-what-we-actually-see">User Interface: What We Actually See</h2>
<p>This is the part we already know:</p>
<ul>
<li><p>Address bar</p>
</li>
<li><p>Tabs</p>
</li>
<li><p>Back / forward buttons</p>
</li>
<li><p>Reload button</p>
</li>
<li><p>Bookmarks</p>
</li>
</ul>
<p>Important thing to note:<br />The UI does not build the webpage. It only lets <em>us</em> control the browser.</p>
<h2 id="heading-browser-engine-vs-rendering-engine">Browser Engine vs Rendering Engine</h2>
<p>A browser engine manages the interaction between the UI and the rendering engine. Working as the overall controller. A rendering engine is a sub-component of the browser engine responsible specifically for parsing HTML/CSS and painting the pixels on the screen. </p>
<ul>
<li><p><strong>Browser Engine → the manager</strong><br />  It connects the UI with the rest of the browser and tells components when to work. Handles high-level browser tasks like networking, security, and managing the overall rendering process. For example, in chromium it's the "engine" that houses Blink and V8.</p>
</li>
<li><p><strong>Rendering Engine → the artist</strong><br />  It takes HTML and CSS and turns them into visible content on the screen. Constructs the DOM and CSSOM, calculates layouts (dimensions), and handles painting pixels. For example, Blink<a target="_blank" href="https://www.google.com/search?q=Blink&amp;oq=Browser+Engine+vs+Rendering+Engine&amp;gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyDQgBEAAYhgMYgAQYigUyDQgCEAAYhgMYgAQYigUyCggDEAAYogQYiQUyBwgEEAAY7wXSAQc1NTBqMGo3qAIAsAIA&amp;sourceid=chrome&amp;ie=UTF-8&amp;ved=2ahUKEwja_MixoriSAxVCUGwGHSh2BS8QgK4QegYIAQgDEAM">(</a>Chrome, Edge, Opera), WebKit <a target="_blank" href="https://www.google.com/search?q=WebKit&amp;oq=Browser+Engine+vs+Rendering+Engine&amp;gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyDQgBEAAYhgMYgAQYigUyDQgCEAAYhgMYgAQYigUyCggDEAAYogQYiQUyBwgEEAAY7wXSAQc1NTBqMGo3qAIAsAIA&amp;sourceid=chrome&amp;ie=UTF-8&amp;ved=2ahUKEwja_MixoriSAxVCUGwGHSh2BS8QgK4QegYIAQgDEAQ">(</a>Safari), and Gecko <a target="_blank" href="https://www.google.com/search?q=Gecko&amp;oq=Browser+Engine+vs+Rendering+Engine&amp;gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyDQgBEAAYhgMYgAQYigUyDQgCEAAYhgMYgAQYigUyCggDEAAYogQYiQUyBwgEEAAY7wXSAQc1NTBqMGo3qAIAsAIA&amp;sourceid=chrome&amp;ie=UTF-8&amp;ved=2ahUKEwja_MixoriSAxVCUGwGHSh2BS8QgK4QegYIAQgDEAU">(</a>Firefox). </p>
</li>
</ul>
<h2 id="heading-networking-how-the-browser-fetches-files">Networking: How the Browser Fetches Files</h2>
<p>When we press Enter:</p>
<ol>
<li><p>The browser finds the server using DNS</p>
</li>
<li><p>Sends a request for the webpage</p>
</li>
<li><p>Receives files such as:</p>
<ul>
<li><p>HTML</p>
</li>
<li><p>CSS</p>
</li>
<li><p>JavaScript</p>
</li>
<li><p>Images</p>
</li>
</ul>
</li>
</ol>
<p>Now the browser has all the raw materials.<br />Next step: understanding them.</p>
<h2 id="heading-html-parsing-and-dom-creation">HTML Parsing and DOM Creation</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769949170582/2d943aa8-f3cb-4a97-8940-5800c9301746.png" alt class="image--center mx-auto" /></p>
<p>DOM Tree from HTML File</p>
<p><img src="https://media.geeksforgeeks.org/wp-content/uploads/20241120143259875787/DOM-Tree1.webp" alt /></p>
<p>HTML is not used as plain text.</p>
<p>The browser parses HTML and creates the DOM (Document Object Model).</p>
<p>We can think of the DOM as a <strong>tree</strong>:</p>
<ul>
<li><p><code>&lt;html&gt;</code> is the root</p>
</li>
<li><p><code>&lt;body&gt;</code> is a main branch</p>
</li>
<li><p><code>&lt;div&gt;</code>, <code>&lt;p&gt;</code>, <code>&lt;button&gt;</code> are smaller branches</p>
</li>
</ul>
<h2 id="heading-css-parsing-and-cssom-creation">CSS Parsing and CSSOM Creation</h2>
<p>Internal CSS parsing structure:</p>
<p><img src="https://res.cloudinary.com/dcxnnco0b/image/upload/w_728%2Cf_auto%2Cq_auto%2Cdpr_auto/v1729886519/cssdom_k1fr2i.webp" alt="Inside the CSS Engine: CSSOM Explained" class="image--center mx-auto" /></p>
<p>CSS is also parsed.</p>
<p>The browser reads CSS rules and builds the <strong>CSSOM (CSS Object Model)</strong>.</p>
<p>If DOM says <em>what exists</em>,<br />CSSOM says <em>how it should look</em>.</p>
<p>Colors, fonts, spacing, positioning - everything visual comes from here.</p>
<h2 id="heading-how-dom-and-cssom-come-together">How DOM and CSSOM come together</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769949611016/478bb7d4-3ee7-4bf6-bf2a-defa8957b278.png" alt class="image--center mx-auto" /></p>
<p>The browser now combines:</p>
<ul>
<li><p>DOM (structure)</p>
</li>
<li><p>CSSOM (style)</p>
</li>
</ul>
<p>This creates the <strong>Render Tree</strong>.</p>
<p><img src="https://media2.dev.to/dynamic/image/width%3D800%2Cheight%3D%2Cfit%3Dscale-down%2Cgravity%3Dauto%2Cformat%3Dauto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56cdizmlhcvpwgjx55k7.png" alt="How web browsers work - the render tree (part 7, with ..." /></p>
<ul>
<li><p>Only visible elements are included</p>
</li>
<li><p>Each element now knows its style</p>
</li>
</ul>
<p>This is the final blueprint for drawing the page.</p>
<h2 id="heading-layout-reflow-painting-and-display">Layout (Reflow), Painting, and Display</h2>
<p><img src="https://substackcdn.com/image/fetch/%24s_%2101rE%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8d3d92c-f0bf-44b8-a24e-4960b8dd63b5_2840x1184.png" alt="What are reflows in browser rendering and why should they be ..." class="image--center mx-auto" /></p>
<p>Now the browser actually draws the page:</p>
<ol>
<li><p><strong>Layout (Reflow)</strong><br /> Calculates the size and position of each element</p>
</li>
<li><p><strong>Painting</strong><br /> Draws text, colors, borders, and images</p>
</li>
<li><p><strong>Display (Compositing)</strong><br /> Combines everything and shows it on the screen</p>
</li>
</ol>
<p>This is where pixels finally appear.</p>
<h2 id="heading-a-very-simple-idea-of-parsing">A Very Simple Idea of Parsing</h2>
<p>Parsing just means <strong>breaking something into structure</strong>.</p>
<p>Example:</p>
<pre><code class="lang-plaintext">2 + 3 × 4
</code></pre>
<p>We don’t calculate left to right.<br />We try to understand the structure first.</p>
<p>Browsers do the same with HTML and CSS:</p>
<ul>
<li><p>Break text into pieces</p>
</li>
<li><p>Understand relationships</p>
</li>
<li><p>Build trees</p>
</li>
</ul>
<p>Parsing = turning text into meaning.</p>
<h2 id="heading-the-complete-view-from-starting-to-end">The Complete View From Starting To End</h2>
<p><img src="https://substackcdn.com/image/fetch/%24s_%21juJ8%21%2Cf_auto%2Cq_auto%3Agood%2Cfl_progressive%3Asteep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff601c3d0-dc52-41dc-b0f0-560f1e31088f_3240x1726.png" alt="From Typing URL To Showing the Webpage - by Saurabh Dashora" /></p>
<p>Type the URL and press Enter</p>
<ol>
<li><p>Browser fetches files</p>
</li>
<li><p>HTML → DOM</p>
</li>
<li><p>CSS → CSSOM</p>
</li>
<li><p>DOM + CSSOM → Render Tree</p>
</li>
<li><p>Layout → Paint → Display</p>
</li>
</ol>
<p>That’s the complete journey.</p>
]]></content:encoded></item></channel></rss>