SlideShare a Scribd company logo
INTRODUCTION TO FRONT END WEB DEVELOPMENT
INDEX
How browsers work
Level 1: HTML
Level 2: CSS
Level 3: Layouts
Level 4: Advanced HTML
Level 5: CSS Ninja
Level 6: JavaScript Beginner
OBJECTIVE
A complete page, using Bootstrap, no JavaScript
INTRODUCTION TO FRONT END WEB DEVELOPMENT
0) HOW BROWSERS WORK
MAIN DESKTOP BROWSERS
MAIN MOBILE BROWSERS
OTHER BROWSERS
BROWSER COMPONENTS
1. The user interface
2. The browser engine
3. The rendering engine
4. Networking
5. UI backend
6. JavaScript interpreter.
7. Data storage.
BROWSER COMPONENTS
3. The rendering engine
1. The user interface
2. The browser engine
4. Networking
5. UI backend
6. JavaScript interpreter.
7. Data storage.
THE RENDERING ENGINE FLOW
PAGE.HTML
<!DOCTYPE html>
<html>
<head>
<link href="style.css" rel="stylesheet">
<title>Title</title>
</head>
<body>
<p>Hello <span>world!</span></p>
<div>
<img src="photo.jpg">
</div>
</body>
</html>
STYLE.CSS
body {
font-size: 16px;
}
p {
font-weight: bold;
}
p span {
display: none;
}
img {
float: right;
}
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
20 20 20 20 26 6c 74 3b 21 44 4f 43 54 59 50 45 20 68 74 6d
6c 3e 20 20 20 20 20 20 26 6c 74 3b 68 74 6d 6c 3e 20 20 20 20 20 20
26 6c 74 3b 68 65 61 64 3e 20 20 20 20 68 72 65 66 3d 5c 22 73 74 79
6c 65 2e 63 73 73 5c 22 20 72 65 6c 3d 5c 22 73 74 79 6c 65 73 68 65
65 74 5c 22 3e 20 20 20 20 20 20 3c
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
2. it translates them to individual characters based on
specified encoding of the file (e.g. UTF-8).
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
<html><head>...</head><body><p>Hello <span>world!</span></p
></body>...
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
3. it converts strings of characters into distinct tokens
specified by the W3C HTML5 standard - e.g. <html>,
<body>.
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
2. it translates them to individual characters based on
specified encoding of the file (e.g. UTF-8).
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
4. it converts the tokens into objects which define their
properties and rules.
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
2. it translates them to individual characters based on
specified encoding of the file (e.g. UTF-8).
3. it converts strings of characters into distinct tokens
specified by the W3C HTML5 standard - e.g. <html>,
<body>.
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
5. it links the created objects in a tree data structure that
also captures the parent-child relationships defined in the
original markup.
The DOM tree is created.
1. The browser sends a request to the server and reads the
raw bytes of the HTML file.
2. it translates them to individual characters based on
specified encoding of the file (e.g. UTF-8).
3. it converts strings of characters into distinct tokens
specified by the W3C HTML5 standard - e.g. <html>,
<body>.
4. it converts the tokens into objects which define their
properties and rules.
THE DOCUMENT OBJECT MODEL TREE
It is the object presentation of the HTML document and the interface of HTML
elements to the outside world, e.g. JavaScript.
1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
The browser builds up the DOM incrementally.
The root of the tree is the Document object.
HTML is quite forgiving by nature, almost one to one
relation to the markup.
CSS, images and scripts are downloaded as soon as
possible by the HTML parser.
JavaScript execution blocks on CSSOM, scripts should go
at the end of the page and CSS at the top or inline.
JavaScript blocks DOM construction unless explicitly
declared as async.
CURRENT OUTPUT
2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
THE CSSOM TREE
2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
The CSSOM cannot be built incrementally like the DOM.
DOM and CSSOM are independent data structures.
By default, CSS is treated as a render blocking resource.
All CSS resources, regardless of blocking or non-blocking
behavior, are downloaded and combined.
Complexity around matching rules.
More nesting in the CSS affects performance, we need to
optimize selectors.
CURRENT OUTPUT
3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
DOM tree CSSOM tree
3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
It is the visual rapresentation of the document.
It enables the browser to paint elements in the screen in
the right order.
Each element in the tree is called renderer or render-
object or frame.
A renderer knows how to layout and paint itself and it's
children.
A renderer represents a rectangular area and contains
geometric informations such as width, height, position.
Every DOM element has a reference to the node in the
render tree.
Elements with display:none; or head tags are in the DOM
but not in the render tree. Not one to one with the DOM.
CURRENT OUTPUT
4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
The browser begins at the root of the render tree and
traverses it to compute the geometry of each object on the
page.
This stage is also known as reflow.
When the changes affect the document contents or
structure, or an element position, a reflow (or relayout)
happens.
When changing element styles which don't affect the
element's position on a page (such as background-color,
border-color, visibility), a repaint happens.
Batch changes, intelligent reflow.
Reflow only dirty trees in the tree.
Accessing certain properties, e.g. with JS will immediately
reflow.
4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
<html>
<head>
<title>Layout example</title>
</head>
<body>
<div style="width: 50%">
<div style="width: 50%">Hello!</div>
</div>
</body>
</html>
4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
REFLOW IN SLOW-MOTION
1:22
CURRENT OUTPUT
RECAP: THE RENDERING ENGINE FLOW
1. PROCESS HTML MARKUP AND BUILD THE DOM TREE
2. PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
3. COMBINE THE DOM AND CSSOM INTO A RENDER TREE
4. RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
5. PAINT THE INDIVIDUAL NODES TO THE SCREEN
5) PAINT THE INDIVIDUAL NODES TO THE SCREEN
5) PAINT THE INDIVIDUAL NODES TO THE SCREEN
The process has visual information about every element of
the render tree.
it will create layers, from bottom to top.
absolute positioned elements and children has their own
layers.
incremental process, builds up over 12 phases, first
background, then borders etc.
it produces bitmaps, upload them in the gpu as a texture,
composites them into a final image to render to the screen.
FINAL OUTPUT
FINAL OUTPUT

More Related Content

PDF
Introduction to WEB HTML, CSS
KEY
HTML/CSS Lecture 1
PPT
HTML & CSS Workshop Notes
PPT
Introduction to HTML
PDF
HTML Lecture Part 1 of 2
PPT
Xhtml 2010
PDF
Web I - 02 - XHTML Introduction
PPTX
Html and Xhtml
Introduction to WEB HTML, CSS
HTML/CSS Lecture 1
HTML & CSS Workshop Notes
Introduction to HTML
HTML Lecture Part 1 of 2
Xhtml 2010
Web I - 02 - XHTML Introduction
Html and Xhtml

What's hot (19)

PPT
Origins and evolution of HTML and XHTML
PPTX
4. html css-java script-basics
PPTX
Css, xhtml, javascript
PPT
HTML 5 Complete Reference
PDF
HTML 5 Step By Step - Ebook
PPTX
05 RD PoSD Tutorial_xhtml_to_html5_2016
PPTX
Introduction to html course digital markerters
PPTX
Html css java script basics All about you need
PPTX
HTML, CSS and Java Scripts Basics
PPTX
Web page concept final ppt
PPT
Web Development using HTML & CSS
PDF
What is HTML - An Introduction to HTML (Hypertext Markup Language)
PPTX
Css presentation lecture 1
PPTX
Dhtml
PDF
Intro to HTML & CSS
PPTX
Basics of HTML 5 for Beginners
PDF
Introduction to XML, XHTML and CSS
PPTX
HTML - 5 - Introduction
PDF
3. tutorial html web desain
Origins and evolution of HTML and XHTML
4. html css-java script-basics
Css, xhtml, javascript
HTML 5 Complete Reference
HTML 5 Step By Step - Ebook
05 RD PoSD Tutorial_xhtml_to_html5_2016
Introduction to html course digital markerters
Html css java script basics All about you need
HTML, CSS and Java Scripts Basics
Web page concept final ppt
Web Development using HTML & CSS
What is HTML - An Introduction to HTML (Hypertext Markup Language)
Css presentation lecture 1
Dhtml
Intro to HTML & CSS
Basics of HTML 5 for Beginners
Introduction to XML, XHTML and CSS
HTML - 5 - Introduction
3. tutorial html web desain
Ad

Viewers also liked (7)

PDF
Working with Grids - Evaluating Bootstrap's grid system
PDF
Modular HTML & CSS Workshop
PDF
HTML & CSS
PDF
Web Performance Optimization @Develer
PDF
Show Me The Page - 介紹 Critical rendering path
PDF
Women in ITM Workshop: Intro to HTML and CSS
PDF
Landing Page Workshop Lean Startup
Working with Grids - Evaluating Bootstrap's grid system
Modular HTML & CSS Workshop
HTML & CSS
Web Performance Optimization @Develer
Show Me The Page - 介紹 Critical rendering path
Women in ITM Workshop: Intro to HTML and CSS
Landing Page Workshop Lean Startup
Ad

Similar to Html css workshop, lesson 0, how browsers work (20)

DOCX
How Browsers Work -By Tali Garsiel and Paul Irish
PPT
Web browser
PDF
How Browsers Work
PDF
Neoito — How modern browsers work
PDF
How browsers work landscape
PDF
Quantum. Just Quantum
PPTX
Web browser - How web browsers work?
PDF
How browser work
PPTX
Critical rendering path presentation
PPTX
Browsers. Magic is inside.
PPT
Web Browsers in Web Engineering for 2024
PDF
Exploring Critical Rendering Path
PDF
Front end for back end developers
PPTX
Web browser architecture
ODP
Light introduction to HTML
PPTX
Tech Winter Break - GDG on Campus - PIET
PPTX
HTML / CSS / JS Web basics
PPTX
From HTML to pixels on the Screen
PPTX
Introduction to HTML+CSS+Javascript.pptx
PPTX
Introduction to HTML+CSS+Javascript.pptx
How Browsers Work -By Tali Garsiel and Paul Irish
Web browser
How Browsers Work
Neoito — How modern browsers work
How browsers work landscape
Quantum. Just Quantum
Web browser - How web browsers work?
How browser work
Critical rendering path presentation
Browsers. Magic is inside.
Web Browsers in Web Engineering for 2024
Exploring Critical Rendering Path
Front end for back end developers
Web browser architecture
Light introduction to HTML
Tech Winter Break - GDG on Campus - PIET
HTML / CSS / JS Web basics
From HTML to pixels on the Screen
Introduction to HTML+CSS+Javascript.pptx
Introduction to HTML+CSS+Javascript.pptx

Recently uploaded (20)

PPTX
ai tools demonstartion for schools and inter college
PPTX
Transform Your Business with a Software ERP System
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPT
Introduction Database Management System for Course Database
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
ai tools demonstartion for schools and inter college
Transform Your Business with a Software ERP System
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
How Creative Agencies Leverage Project Management Software.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Introduction Database Management System for Course Database
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Design an Analysis of Algorithms II-SECS-1021-03
ManageIQ - Sprint 268 Review - Slide Deck
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
ISO 45001 Occupational Health and Safety Management System
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
CHAPTER 2 - PM Management and IT Context
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Internet Downloader Manager (IDM) Crack 6.42 Build 41

Html css workshop, lesson 0, how browsers work

  • 1. INTRODUCTION TO FRONT END WEB DEVELOPMENT
  • 2. INDEX How browsers work Level 1: HTML Level 2: CSS Level 3: Layouts Level 4: Advanced HTML Level 5: CSS Ninja Level 6: JavaScript Beginner
  • 3. OBJECTIVE A complete page, using Bootstrap, no JavaScript
  • 4. INTRODUCTION TO FRONT END WEB DEVELOPMENT 0) HOW BROWSERS WORK
  • 5. MAIN DESKTOP BROWSERS MAIN MOBILE BROWSERS
  • 7. BROWSER COMPONENTS 1. The user interface 2. The browser engine 3. The rendering engine 4. Networking 5. UI backend 6. JavaScript interpreter. 7. Data storage.
  • 8. BROWSER COMPONENTS 3. The rendering engine 1. The user interface 2. The browser engine 4. Networking 5. UI backend 6. JavaScript interpreter. 7. Data storage.
  • 10. PAGE.HTML <!DOCTYPE html> <html> <head> <link href="style.css" rel="stylesheet"> <title>Title</title> </head> <body> <p>Hello <span>world!</span></p> <div> <img src="photo.jpg"> </div> </body> </html>
  • 11. STYLE.CSS body { font-size: 16px; } p { font-weight: bold; } p span { display: none; } img { float: right; }
  • 12. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE
  • 13. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 1. The browser sends a request to the server and reads the raw bytes of the HTML file. 20 20 20 20 26 6c 74 3b 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 20 20 20 20 20 20 26 6c 74 3b 68 74 6d 6c 3e 20 20 20 20 20 20 26 6c 74 3b 68 65 61 64 3e 20 20 20 20 68 72 65 66 3d 5c 22 73 74 79 6c 65 2e 63 73 73 5c 22 20 72 65 6c 3d 5c 22 73 74 79 6c 65 73 68 65 65 74 5c 22 3e 20 20 20 20 20 20 3c
  • 14. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 2. it translates them to individual characters based on specified encoding of the file (e.g. UTF-8). 1. The browser sends a request to the server and reads the raw bytes of the HTML file. <html><head>...</head><body><p>Hello <span>world!</span></p ></body>...
  • 15. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 3. it converts strings of characters into distinct tokens specified by the W3C HTML5 standard - e.g. <html>, <body>. 1. The browser sends a request to the server and reads the raw bytes of the HTML file. 2. it translates them to individual characters based on specified encoding of the file (e.g. UTF-8).
  • 16. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 4. it converts the tokens into objects which define their properties and rules. 1. The browser sends a request to the server and reads the raw bytes of the HTML file. 2. it translates them to individual characters based on specified encoding of the file (e.g. UTF-8). 3. it converts strings of characters into distinct tokens specified by the W3C HTML5 standard - e.g. <html>, <body>.
  • 17. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE 5. it links the created objects in a tree data structure that also captures the parent-child relationships defined in the original markup. The DOM tree is created. 1. The browser sends a request to the server and reads the raw bytes of the HTML file. 2. it translates them to individual characters based on specified encoding of the file (e.g. UTF-8). 3. it converts strings of characters into distinct tokens specified by the W3C HTML5 standard - e.g. <html>, <body>. 4. it converts the tokens into objects which define their properties and rules.
  • 18. THE DOCUMENT OBJECT MODEL TREE It is the object presentation of the HTML document and the interface of HTML elements to the outside world, e.g. JavaScript.
  • 19. 1) PROCESS HTML MARKUP AND BUILD THE DOM TREE The browser builds up the DOM incrementally. The root of the tree is the Document object. HTML is quite forgiving by nature, almost one to one relation to the markup. CSS, images and scripts are downloaded as soon as possible by the HTML parser. JavaScript execution blocks on CSSOM, scripts should go at the end of the page and CSS at the top or inline. JavaScript blocks DOM construction unless explicitly declared as async.
  • 21. 2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
  • 22. 2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE
  • 24. 2)PROCESS CSS MARKUP AND BUILD THE CSSOM TREE The CSSOM cannot be built incrementally like the DOM. DOM and CSSOM are independent data structures. By default, CSS is treated as a render blocking resource. All CSS resources, regardless of blocking or non-blocking behavior, are downloaded and combined. Complexity around matching rules. More nesting in the CSS affects performance, we need to optimize selectors.
  • 26. 3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
  • 27. 3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE DOM tree CSSOM tree
  • 28. 3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE
  • 29. 3)COMBINE THE DOM AND CSSOM INTO A RENDER TREE It is the visual rapresentation of the document. It enables the browser to paint elements in the screen in the right order. Each element in the tree is called renderer or render- object or frame. A renderer knows how to layout and paint itself and it's children. A renderer represents a rectangular area and contains geometric informations such as width, height, position. Every DOM element has a reference to the node in the render tree. Elements with display:none; or head tags are in the DOM but not in the render tree. Not one to one with the DOM.
  • 31. 4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
  • 32. 4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE The browser begins at the root of the render tree and traverses it to compute the geometry of each object on the page. This stage is also known as reflow. When the changes affect the document contents or structure, or an element position, a reflow (or relayout) happens. When changing element styles which don't affect the element's position on a page (such as background-color, border-color, visibility), a repaint happens. Batch changes, intelligent reflow. Reflow only dirty trees in the tree. Accessing certain properties, e.g. with JS will immediately reflow.
  • 33. 4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE <html> <head> <title>Layout example</title> </head> <body> <div style="width: 50%"> <div style="width: 50%">Hello!</div> </div> </body> </html>
  • 34. 4) RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE
  • 37. RECAP: THE RENDERING ENGINE FLOW 1. PROCESS HTML MARKUP AND BUILD THE DOM TREE 2. PROCESS CSS MARKUP AND BUILD THE CSSOM TREE 3. COMBINE THE DOM AND CSSOM INTO A RENDER TREE 4. RUN LAYOUT ON THE RENDER TREE TO COMPUTE GEOMETRY OF EACH NODE 5. PAINT THE INDIVIDUAL NODES TO THE SCREEN
  • 38. 5) PAINT THE INDIVIDUAL NODES TO THE SCREEN
  • 39. 5) PAINT THE INDIVIDUAL NODES TO THE SCREEN The process has visual information about every element of the render tree. it will create layers, from bottom to top. absolute positioned elements and children has their own layers. incremental process, builds up over 12 phases, first background, then borders etc. it produces bitmaps, upload them in the gpu as a texture, composites them into a final image to render to the screen.