<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jsuriyan on Medium]]></title>
        <description><![CDATA[Stories by Jsuriyan on Medium]]></description>
        <link>https://medium.com/@jsuriyan123?source=rss-347e6311244e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FdUNcRWrtDyhHW32.jpg</url>
            <title>Stories by Jsuriyan on Medium</title>
            <link>https://medium.com/@jsuriyan123?source=rss-347e6311244e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:20:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jsuriyan123/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How an HTML code becomes a webpage?]]></title>
            <link>https://medium.com/@jsuriyan123/how-an-html-code-becomes-a-webpage-6f540df9f8a0?source=rss-347e6311244e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f540df9f8a0</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[website]]></category>
            <dc:creator><![CDATA[Jsuriyan]]></dc:creator>
            <pubDate>Thu, 08 Aug 2019 07:38:55 GMT</pubDate>
            <atom:updated>2019-08-08T07:38:55.339Z</atom:updated>
            <content:encoded><![CDATA[<p>hi everyone, I started learning HTML a month before and right from the start I am curious how HTML code I write is displayed into a webpage? after researching on the internet, I am here to share my understanding of how actually browser displays the HTML code.</p><p><strong>What is HTML?</strong></p><p>For those who don’t know HTML stands for HyperText Markup Language,</p><p><strong>what is mark up language?</strong></p><p>Markup languages are designed to format( arrange or put into a format) and create a webpage.HTML is an example of mark-up language The contents of each webpage are defined by HTML tags. Basic page tags, such as &lt;head&gt;, &lt;body&gt;, and &lt;div&gt; define sections of the page, while tags such as &lt;table&gt;, &lt;form&gt;, &lt;image&gt;, and &lt;a&gt; define elements within the page. Most elements require a beginning and end tag, with the content placed between the tags.</p><p><strong>IS HTML IS ENOUGH TO CREATE A WEBPAGE?</strong></p><p>so HTML is used to create a webpage, in specific, it is used to create a layout and there is something called CSS(cascading style sheet) which is used to style the layout which is created using HTML. Still, the webpage is incomplete and needs something called javascript it is used for client-side validation and interaction with users and to add some special effects to your page.</p><p>In short, <strong>HTML</strong> is used to create a <strong>layout</strong> for your webpage. <strong>CSS </strong>for <strong>styling </strong>that layout and <strong>JAVASCRIPT </strong>are used for the<strong> behavior </strong>of your webpage.</p><p>okay now let’s get into the topic, those who don’t know anything about HTML go play with HTML tags and come back here.</p><p><strong>okay, when you open an HTML code in your browser how your browser displays it?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*hTGHApowI6R35MjFRvR7PA.jpeg" /></figure><p>Every browser has a browser engine, The primary job of a <strong>browser engine</strong> is to transform HTML documents and other resources of a web page into an interactive visual representation on a user’s device.</p><p><strong>HOW BROWSER ENGINE DOES IT?</strong></p><p>when you open an HTML document in your web browser all it receives is just raw bytes of data and the raw data should be converted into characters you see and what browser understands.</p><p>so first, the raw data is converted into DOM (Document object model) which is something that the browser understands</p><p>after the data are converted into characters, the code you write is parsed into small pieces of code called tokens</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rz4nHtB1b2OWSjPBqKRS-g.png" /></figure><p><strong>WHAT IS PARSING?</strong></p><p>Parsing is separating your code into several small pieces of code called Tokens and the parser is something which understands the meanings of each tag you included in your document. This is where the Texts are converted to what you see your webpage and nodes are nothing but the links between the tokens so every token is a node if it connected with two or more other tokens. so if you change a style for a parent node every token under it will be also changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*eewSIxyMpDmbZL3Sl0hj6g.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*BmdVqvA8ZaNBsMzNqAG15w.png" /></figure><p>the nodes are then linked in a tree data structure known as the DOM. The DOM establishes parent-child relationships, adjacent sibling relationships, etc. The relationship between every node is established in this DOM object.</p><p><strong>DOM TREE:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*PF7BvpEYebafretCGKZylg.gif" /></figure><p>The DOM structure will look like this with tokens and nodes. Depending on how large the html file is, the DOM construction process may take some time. No matter how small, it does take some time (no matter how minute) regardless of the file size.</p><p>And there is something called CSSOM</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3KhdKWoKQC8_X_M_9MO6rQ.png" /></figure><p>The process is the same as DOM and CSS has something called the <a href="https://blog.logrocket.com/how-css-works-understanding-the-cascade-d181cd89a4d8">Cascade</a>. The Cascade is how the browser determines what styles are applied to an element.</p><p><strong>RENDER TREE:</strong></p><p>And finally with DOM tree and CSSOM combined into something called render tree</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DDiTAbp5TzyntJFXLXOXHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lxg6hKDseE3lVWmWUwfQLw.png" /></figure><p>The final output is a render that contains both the content and style information of all the visible content on the screen. <strong>With the render tree in place, we can proceed to the “layout” stage.</strong></p><p><strong>Though if an element is there in DOM tree but its style is mentioned as display: none, it will not be there in the render tree, so render tree contains only visible elements and not hidden elements.</strong></p><p><strong>LAYOUT AND PAINT:</strong></p><p>Up to this point we’ve calculated which nodes should be visible and their computed styles, but we have not calculated their exact position and size within the <a href="https://developers.google.com/web/fundamentals/design-and-ux/responsive/#set-the-viewport">viewport</a> of the device — -that’s the “layout” stage, also known as “reflow.”</p><p>To figure out the exact size and position of each object on the page, the browser begins at the root of the render tree and traverses it. so browser engines calculate the exact position of each and every element .</p><p>The “Layout” event captures the render tree construction, position, and size calculation in the Timeline.When the layout is complete, the browser issues “Paint Setup” and “Paint” events, which convert the render tree to pixels on the screen.</p><p><strong>conclusion:<br></strong>so this is how your HTML code renders in your browser and this blog is just a basic overview for beginners who are curious to know what happens and i have not told anything about javascript where if you included javascript then the case would be slightly different where The DOM construction will be halted until the script’s execution is complete.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f540df9f8a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>