How Rendering Works in Frontend Development

Relearning Frontend Fundamentals: Rendering pipeline For a basic Html ,css , js file The rendering process looks something like this 1.Tokenization : Browser parses the HTML file and creates tokens 2. DOM : For each start tag token, a corresponding Node is created and added to the Document Object Model (DOM) tree. 3.CSSOM : it encounters a link tag pointing to a css file , the browser fetches the css file , parses and starts building a CSSOM tree 4.JS : it reads the first script tag , it blocks everything and fetches and executes js then resume building html , css tree. (This is by default , the order can be changed with properties such as "defer" and "async" which could affect performance) 5.Render Tree : HTML and CSS tree makes a Render Tree 6.Layout : layout is shifted , calculating position of each element 7.Paint : The pixels are painted on the screen , user finally sees the content. #FrontendDevelopment #JavaScript #Rendering #DOM

To view or add a comment, sign in

Explore content categories