SlideShare a Scribd company logo
1 of 41
Download to read offline
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

What's hot

Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLHowpk
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basicsNikita Garg
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete ReferenceEPAM Systems
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookScottperrone
 
05 RD PoSD Tutorial_xhtml_to_html5_2016
05 RD PoSD Tutorial_xhtml_to_html5_201605 RD PoSD Tutorial_xhtml_to_html5_2016
05 RD PoSD Tutorial_xhtml_to_html5_2016Rich Dron
 
Introduction to html course digital markerters
Introduction to html course digital markertersIntroduction to html course digital markerters
Introduction to html course digital markertersSEO SKills
 
Html css java script basics All about you need
Html css java script basics All about you needHtml css java script basics All about you need
Html css java script basics All about you needDipen Parmar
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsSun Technlogies
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)Ahsan Rahim
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1Mudasir Syed
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSSSyed Sami
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSJussi Pohjolainen
 
3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desainfaizibra
 

What's hot (20)

Html and Xhtml
Html and XhtmlHtml and Xhtml
Html and Xhtml
 
Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTML
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basics
 
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete Reference
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - Ebook
 
05 RD PoSD Tutorial_xhtml_to_html5_2016
05 RD PoSD Tutorial_xhtml_to_html5_201605 RD PoSD Tutorial_xhtml_to_html5_2016
05 RD PoSD Tutorial_xhtml_to_html5_2016
 
Introduction to html course digital markerters
Introduction to html course digital markertersIntroduction to html course digital markerters
Introduction to html course digital markerters
 
Html css java script basics All about you need
Html css java script basics All about you needHtml css java script basics All about you need
Html css java script basics All about you need
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
Web page concept final ppt
Web page concept  final pptWeb page concept  final ppt
Web page concept final ppt
 
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1
 
Dhtml
DhtmlDhtml
Dhtml
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
 
Basics of HTML 5 for Beginners
Basics of HTML 5 for Beginners Basics of HTML 5 for Beginners
Basics of HTML 5 for Beginners
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
HTML - 5 - Introduction
HTML - 5 - IntroductionHTML - 5 - Introduction
HTML - 5 - Introduction
 
3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desain
 

Viewers also liked

Working with Grids - Evaluating Bootstrap's grid system
Working with Grids - Evaluating Bootstrap's grid systemWorking with Grids - Evaluating Bootstrap's grid system
Working with Grids - Evaluating Bootstrap's grid systemAlbino Tonnina
 
Modular HTML & CSS Workshop
Modular HTML & CSS WorkshopModular HTML & CSS Workshop
Modular HTML & CSS WorkshopShay Howe
 
Web Performance Optimization @Develer
Web Performance Optimization @DevelerWeb Performance Optimization @Develer
Web Performance Optimization @DevelerMassimo Iacolare
 
Show Me The Page - 介紹 Critical rendering path
Show Me The Page - 介紹 Critical rendering pathShow Me The Page - 介紹 Critical rendering path
Show Me The Page - 介紹 Critical rendering pathYvonne Yu
 
Women in ITM Workshop: Intro to HTML and CSS
Women in ITM Workshop: Intro to HTML and CSSWomen in ITM Workshop: Intro to HTML and CSS
Women in ITM Workshop: Intro to HTML and CSSShanta Nathwani
 
Landing Page Workshop Lean Startup
Landing Page Workshop Lean StartupLanding Page Workshop Lean Startup
Landing Page Workshop Lean StartupSaverio Bruno
 

Viewers also liked (7)

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

Similar to Html css workshop, lesson 0, how browsers work

Document Object Model
Document Object ModelDocument Object Model
Document Object Modelchomas kandar
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Modelchomas kandar
 
Exploring Critical Rendering Path
Exploring Critical Rendering PathExploring Critical Rendering Path
Exploring Critical Rendering PathRaphael Amorim
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pagesNilesh Bafna
 
Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)Hyungwook Lee
 
Responsive content
Responsive contentResponsive content
Responsive contenthonzie
 
Vision academy sachinsir_9822506209_html_java_script_notes (1)
Vision academy sachinsir_9822506209_html_java_script_notes (1)Vision academy sachinsir_9822506209_html_java_script_notes (1)
Vision academy sachinsir_9822506209_html_java_script_notes (1)ShraddhaGurav7
 
Zotero Framework Translators
Zotero Framework TranslatorsZotero Framework Translators
Zotero Framework Translatorsadam3smith
 
Document Object Model
Document Object ModelDocument Object Model
Document Object ModelMayur Mudgal
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
Browsers. Magic is inside.
Browsers. Magic is inside.Browsers. Magic is inside.
Browsers. Magic is inside.Devexperts
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Estelle Weyl
 
How Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishHow Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishNagamurali Reddy
 
Supplement web design
Supplement web designSupplement web design
Supplement web designshelly3160
 

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

Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Exploring Critical Rendering Path
Exploring Critical Rendering PathExploring Critical Rendering Path
Exploring Critical Rendering Path
 
Introductory css and j query
Introductory css and j queryIntroductory css and j query
Introductory css and j query
 
Web performance
Web performanceWeb performance
Web performance
 
Break out of The Box - Part 2
Break out of The Box - Part 2Break out of The Box - Part 2
Break out of The Box - Part 2
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)
 
Responsive content
Responsive contentResponsive content
Responsive content
 
Vision academy sachinsir_9822506209_html_java_script_notes (1)
Vision academy sachinsir_9822506209_html_java_script_notes (1)Vision academy sachinsir_9822506209_html_java_script_notes (1)
Vision academy sachinsir_9822506209_html_java_script_notes (1)
 
Zotero Framework Translators
Zotero Framework TranslatorsZotero Framework Translators
Zotero Framework Translators
 
Ajax xml json
Ajax xml jsonAjax xml json
Ajax xml json
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Browsers. Magic is inside.
Browsers. Magic is inside.Browsers. Magic is inside.
Browsers. Magic is inside.
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0
 
How Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishHow Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul Irish
 
Supplement web design
Supplement web designSupplement web design
Supplement web design
 

Recently uploaded

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

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.