SlideShare a Scribd company logo
Cascading Style Sheets 3 (CSS3)
What’s CSS?
> CSS Stands for Cascading Style Sheets.
> It describes how HTML elements are to be
displayed on screen, paper, or in other media.
> External style sheets are stores in a (.css) file.
> Checkout same page, different style sheets here,
https://www.w3schools.com/css/css_intro.asp
Why CSS?
> CSS defines styles for our website. Everything will
look weird if we don’t style our web pages.
> Imagine living in a building without its wall being
painted!
> Moreover, we all want our customers / visitors to
spend some time on the website instead of just
closing them at once. Well, to stop them and gain
their first impression as the best one, we need to
have some awesome styles for the web page!
Where would you want to go is why you want to use CSS!
CSS Syntax CSS Selectors
That’s how we style it!
30 CSS Selector you must memorize: https://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048
CSS vs CSS3
> Pseudo Classes (Limited)
[selector]:pseudo-class{
// CSS Code here
}
E.g.: :first-child
> No support for animations. Animations were added using
JavaScript & jQuery (a JavaScript library).
> Before CSS3 developers used to develop images that looked like
rounded corners.
> Not compatible with CSS3
> Much more pseudo classes
E.g.: :nth-child()
:root
:empty
> Supports text shadow
> Supports animations
> Supports border-radius & gradient
> Backward Compatible to CSS
> They load faster and time required to write them is lesser as
compared to that of CSS.
Cascading Specificity Inheritance
What do you think h1 will be colored as?
Cascading means that the order
of CSS rules matter. When two
rules apply that have equal
specificity, the latter one will be
used.
Specificity basically is a measure of the
CSS rule priority.
In simple words, it is how the browser
decides which rule applies if multiple rules
have different selectors
Here, class has greater specificity than
the HTML tag itself [Rule]
Some CSS property values set on parent
elements are inherited by their child
elements, and some aren't.
For example, if you set a color and
font-family on an element, every element
inside it will also be styled with that color
and font, unless you've applied different
color and font values directly to them.
Some properties do not inherit — for
example if you set a width of 50% on an
element, all of its descendants do not get
a width of 50% of their parent's width.
Which properties are inherited by default
and which aren't is largely down to
common sense.
Controlling CSS Inheritance - ( inherit, initial, unset, revert, all )
Takes computed value from the parent.
Sets a property to its initial value defined
on a per-property basis by the CSS
specifications..
Sets a property to its inherited value if it inherits,
or to its initial value if not.
https://jsbin.com/sayodab/1/edit?html,css,output
New additions:
> revert :
It resets the property to its inherited value if it
inherits from its parent or to the default value
established by the user agent stylesheet (or by user
styles, if any exist).
User Agent Style sheets simply refer to the default styles that
browsers apply to web pages.
> all :
Can be used to apply one of these inheritance
values to (almost) all properties at once.
https://jsbin.com/livugin/1/edit?html,css,output
# Unset vs Revert (Important)
https://jsbin.com/famagez/2/edit?html,css,output
Not same
More on Cascade
Source Order
If you have more than one
rule, which has exactly the
same weight, then the one
that comes last in the CSS
will win.
Specificity
1) Inline Style - 1000
2) Id selector - 100
3) Class selector (.class, [attributes], :pseudo-class, :hover, :focus, etc.) - 10
4) Element / Tag & Pseudo Elements (h1, :pseudo-elements, :before, :after, :first-element, etc.) - 1
5) :not, * - 0
6) !important - 10,000
Note:
1) The universal selector (*), combinators (+, >, ~, ' '), and negation pseudo-class (:not) have no effect
on specificity.
2) Inline > Internal > External
101
100
11
CSS Box Model - 1
> Normal : Inline Block
> The box will not break into new line.
> Width & height properties will not apply.
> Only horizontal paddings, margins and borders will apply and will
cause other boxes to move away from them.
> Vertical padding won’t apply.
https://jsbin.com/zexolib/2/edit?html,css,output
> E.g. <a>, <span>, <em>, <strong>, etc.
> The box will break into new line.
> Width & height properties are respected.
> Will cover at max 100% by default.
> All padding, margin and borders will cause other boxes to move
away.
> E.g. <div>, <h1>, <p>, etc.
> Not Normal : Flex
> When flex is set, the outer display turns to block but the inner
display is set to flex.
> Inline Flex
CSS Box Model - 2
Standart Box Model Alternative Box Model
> In this model, the content area of box =
(total-width of box - border / padding).
> Can be set via:
box-sizing: border-box
> Applying everywhere only once:
> Default
> total width = content-area of box
> padding & border are added
separately.
> Can be set via:
box-sizing: content-box
You know where to find me!
webcrat.tech@gmail.com
PS. Keep the subject line as:
[ Web Dev BootCamp ‘ 20 ]
Github @webber2408
LinkedIn @rahul-sharma-25b30b114
Medium @webcrat.tech
References
> Amazon.com
> Undraw.co
> Icons made by Freepik from www.flaticon.com
> MDN (HTML): https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started
> MDN (CSS - Important): https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks
> W3Schools: https://www.w3schools.com/html/
> HTML Semantics: vikingcodeschool.com/html5-and-css3/html5-semantic-tags
> WikiPedia: https://en.wikipedia.org/wiki/Semantic_HTML

More Related Content

What's hot

Css3
Css3Css3
CSS Part II
CSS Part IICSS Part II
CSS Part II
Doncho Minkov
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
The Fast And The Fabulous
The Fast And The FabulousThe Fast And The Fabulous
The Fast And The Fabulous
Nicole Sullivan
 
Css3
Css3Css3
An Introduction to CSS
An Introduction to CSSAn Introduction to CSS
An Introduction to CSS
John Catterfeld
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
Achmad Solichin
 
CSS101 - Concept Fundamentals for non UI Developers
CSS101 - Concept Fundamentals for non UI DevelopersCSS101 - Concept Fundamentals for non UI Developers
CSS101 - Concept Fundamentals for non UI Developers
Darren Gideon
 
Pemrograman Web 3 - CSS Basic Part 2
Pemrograman Web 3 - CSS Basic Part 2Pemrograman Web 3 - CSS Basic Part 2
Pemrograman Web 3 - CSS Basic Part 2
Nur Fadli Utomo
 
Pemrograman Web 2 - CSS
Pemrograman Web 2 - CSSPemrograman Web 2 - CSS
Pemrograman Web 2 - CSS
Nur Fadli Utomo
 
Css3 Presetation
Css3 PresetationCss3 Presetation
Css3 Presetation
Nicole Glasgow
 
CSS Box Model
CSS Box ModelCSS Box Model
CSS Box Model
Gerson Abesamis
 
LESS CSS Pre-processor
LESS CSS Pre-processorLESS CSS Pre-processor
LESS CSS Pre-processor
Kannika Kong
 
LESS(CSS preprocessor)
LESS(CSS preprocessor)LESS(CSS preprocessor)
LESS(CSS preprocessor)
VIPIN KUMAR
 
Div Tag Tutorial
Div Tag TutorialDiv Tag Tutorial
Div Tag Tutorial
bav123
 
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSSObject-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Li-Wei Lu
 
Css3
Css3Css3
Languages for web(HTML,CSS,JS)
Languages for web(HTML,CSS,JS)Languages for web(HTML,CSS,JS)
Languages for web(HTML,CSS,JS)
MHR11
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
Christopher Schmitt
 
Intro to CSS Selectors in Drupal
Intro to CSS Selectors in DrupalIntro to CSS Selectors in Drupal
Intro to CSS Selectors in Drupal
cgmonroe
 

What's hot (20)

Css3
Css3Css3
Css3
 
CSS Part II
CSS Part IICSS Part II
CSS Part II
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
The Fast And The Fabulous
The Fast And The FabulousThe Fast And The Fabulous
The Fast And The Fabulous
 
Css3
Css3Css3
Css3
 
An Introduction to CSS
An Introduction to CSSAn Introduction to CSS
An Introduction to CSS
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
 
CSS101 - Concept Fundamentals for non UI Developers
CSS101 - Concept Fundamentals for non UI DevelopersCSS101 - Concept Fundamentals for non UI Developers
CSS101 - Concept Fundamentals for non UI Developers
 
Pemrograman Web 3 - CSS Basic Part 2
Pemrograman Web 3 - CSS Basic Part 2Pemrograman Web 3 - CSS Basic Part 2
Pemrograman Web 3 - CSS Basic Part 2
 
Pemrograman Web 2 - CSS
Pemrograman Web 2 - CSSPemrograman Web 2 - CSS
Pemrograman Web 2 - CSS
 
Css3 Presetation
Css3 PresetationCss3 Presetation
Css3 Presetation
 
CSS Box Model
CSS Box ModelCSS Box Model
CSS Box Model
 
LESS CSS Pre-processor
LESS CSS Pre-processorLESS CSS Pre-processor
LESS CSS Pre-processor
 
LESS(CSS preprocessor)
LESS(CSS preprocessor)LESS(CSS preprocessor)
LESS(CSS preprocessor)
 
Div Tag Tutorial
Div Tag TutorialDiv Tag Tutorial
Div Tag Tutorial
 
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSSObject-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
 
Css3
Css3Css3
Css3
 
Languages for web(HTML,CSS,JS)
Languages for web(HTML,CSS,JS)Languages for web(HTML,CSS,JS)
Languages for web(HTML,CSS,JS)
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
 
Intro to CSS Selectors in Drupal
Intro to CSS Selectors in DrupalIntro to CSS Selectors in Drupal
Intro to CSS Selectors in Drupal
 

Similar to Introduction to CSS3

CSS.pptx
CSS.pptxCSS.pptx
CSS Overview
CSS OverviewCSS Overview
CSS Overview
Doncho Minkov
 
Internet tech &amp; web prog. p4,5
Internet tech &amp; web prog.  p4,5Internet tech &amp; web prog.  p4,5
Internet tech &amp; web prog. p4,5
Taymoor Nazmy
 
Css
CssCss
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
Singsys Pte Ltd
 
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...
JebaRaj26
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSS
Toni Kolev
 
Css
CssCss
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
nikhilsh66131
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
CSS: How To Learn Easily
CSS: How To Learn EasilyCSS: How To Learn Easily
CSS: How To Learn Easily
shabab shihan
 
Css
CssCss
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
KushagraChadha1
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
Zoltan Iszlai
 
Full
FullFull
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
CK Yang
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
Sun Technlogies
 
Unit 2 WT-CSS.pptx web technology project
Unit 2 WT-CSS.pptx web technology projectUnit 2 WT-CSS.pptx web technology project
Unit 2 WT-CSS.pptx web technology project
abhiramhatwar
 
Css training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentialsCss training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentials
QA TrainingHub
 
Css basics
Css basicsCss basics
Css basics
ASIT
 

Similar to Introduction to CSS3 (20)

CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
CSS Overview
CSS OverviewCSS Overview
CSS Overview
 
Internet tech &amp; web prog. p4,5
Internet tech &amp; web prog.  p4,5Internet tech &amp; web prog.  p4,5
Internet tech &amp; web prog. p4,5
 
Css
CssCss
Css
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSS
 
Css
CssCss
Css
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
 
CSS: How To Learn Easily
CSS: How To Learn EasilyCSS: How To Learn Easily
CSS: How To Learn Easily
 
Css
CssCss
Css
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
 
Full
FullFull
Full
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
 
Unit 2 WT-CSS.pptx web technology project
Unit 2 WT-CSS.pptx web technology projectUnit 2 WT-CSS.pptx web technology project
Unit 2 WT-CSS.pptx web technology project
 
Css training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentialsCss training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentials
 
Css basics
Css basicsCss basics
Css basics
 

More from RAHUL SHARMA

Introduction to Web Development
Introduction to Web DevelopmentIntroduction to Web Development
Introduction to Web Development
RAHUL SHARMA
 
Introduction to HTML 5
Introduction to HTML 5Introduction to HTML 5
Introduction to HTML 5
RAHUL SHARMA
 
Webpack presentation
Webpack presentationWebpack presentation
Webpack presentation
RAHUL SHARMA
 
Introduction to Mixins & OOPS
Introduction to Mixins & OOPSIntroduction to Mixins & OOPS
Introduction to Mixins & OOPS
RAHUL SHARMA
 
ECMAScript (2015 - 2019)
ECMAScript (2015 - 2019)ECMAScript (2015 - 2019)
ECMAScript (2015 - 2019)
RAHUL SHARMA
 
Mixins & OOPS in JavaScript
Mixins & OOPS in JavaScriptMixins & OOPS in JavaScript
Mixins & OOPS in JavaScript
RAHUL SHARMA
 

More from RAHUL SHARMA (6)

Introduction to Web Development
Introduction to Web DevelopmentIntroduction to Web Development
Introduction to Web Development
 
Introduction to HTML 5
Introduction to HTML 5Introduction to HTML 5
Introduction to HTML 5
 
Webpack presentation
Webpack presentationWebpack presentation
Webpack presentation
 
Introduction to Mixins & OOPS
Introduction to Mixins & OOPSIntroduction to Mixins & OOPS
Introduction to Mixins & OOPS
 
ECMAScript (2015 - 2019)
ECMAScript (2015 - 2019)ECMAScript (2015 - 2019)
ECMAScript (2015 - 2019)
 
Mixins & OOPS in JavaScript
Mixins & OOPS in JavaScriptMixins & OOPS in JavaScript
Mixins & OOPS in JavaScript
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

Introduction to CSS3

  • 2. What’s CSS? > CSS Stands for Cascading Style Sheets. > It describes how HTML elements are to be displayed on screen, paper, or in other media. > External style sheets are stores in a (.css) file. > Checkout same page, different style sheets here, https://www.w3schools.com/css/css_intro.asp Why CSS? > CSS defines styles for our website. Everything will look weird if we don’t style our web pages. > Imagine living in a building without its wall being painted! > Moreover, we all want our customers / visitors to spend some time on the website instead of just closing them at once. Well, to stop them and gain their first impression as the best one, we need to have some awesome styles for the web page! Where would you want to go is why you want to use CSS!
  • 3. CSS Syntax CSS Selectors That’s how we style it! 30 CSS Selector you must memorize: https://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048
  • 4. CSS vs CSS3 > Pseudo Classes (Limited) [selector]:pseudo-class{ // CSS Code here } E.g.: :first-child > No support for animations. Animations were added using JavaScript & jQuery (a JavaScript library). > Before CSS3 developers used to develop images that looked like rounded corners. > Not compatible with CSS3 > Much more pseudo classes E.g.: :nth-child() :root :empty > Supports text shadow > Supports animations > Supports border-radius & gradient > Backward Compatible to CSS > They load faster and time required to write them is lesser as compared to that of CSS.
  • 5. Cascading Specificity Inheritance What do you think h1 will be colored as? Cascading means that the order of CSS rules matter. When two rules apply that have equal specificity, the latter one will be used. Specificity basically is a measure of the CSS rule priority. In simple words, it is how the browser decides which rule applies if multiple rules have different selectors Here, class has greater specificity than the HTML tag itself [Rule] Some CSS property values set on parent elements are inherited by their child elements, and some aren't. For example, if you set a color and font-family on an element, every element inside it will also be styled with that color and font, unless you've applied different color and font values directly to them. Some properties do not inherit — for example if you set a width of 50% on an element, all of its descendants do not get a width of 50% of their parent's width. Which properties are inherited by default and which aren't is largely down to common sense.
  • 6. Controlling CSS Inheritance - ( inherit, initial, unset, revert, all ) Takes computed value from the parent. Sets a property to its initial value defined on a per-property basis by the CSS specifications.. Sets a property to its inherited value if it inherits, or to its initial value if not. https://jsbin.com/sayodab/1/edit?html,css,output New additions: > revert : It resets the property to its inherited value if it inherits from its parent or to the default value established by the user agent stylesheet (or by user styles, if any exist). User Agent Style sheets simply refer to the default styles that browsers apply to web pages. > all : Can be used to apply one of these inheritance values to (almost) all properties at once. https://jsbin.com/livugin/1/edit?html,css,output # Unset vs Revert (Important) https://jsbin.com/famagez/2/edit?html,css,output Not same
  • 7. More on Cascade Source Order If you have more than one rule, which has exactly the same weight, then the one that comes last in the CSS will win. Specificity 1) Inline Style - 1000 2) Id selector - 100 3) Class selector (.class, [attributes], :pseudo-class, :hover, :focus, etc.) - 10 4) Element / Tag & Pseudo Elements (h1, :pseudo-elements, :before, :after, :first-element, etc.) - 1 5) :not, * - 0 6) !important - 10,000 Note: 1) The universal selector (*), combinators (+, >, ~, ' '), and negation pseudo-class (:not) have no effect on specificity. 2) Inline > Internal > External 101 100 11
  • 8. CSS Box Model - 1 > Normal : Inline Block > The box will not break into new line. > Width & height properties will not apply. > Only horizontal paddings, margins and borders will apply and will cause other boxes to move away from them. > Vertical padding won’t apply. https://jsbin.com/zexolib/2/edit?html,css,output > E.g. <a>, <span>, <em>, <strong>, etc. > The box will break into new line. > Width & height properties are respected. > Will cover at max 100% by default. > All padding, margin and borders will cause other boxes to move away. > E.g. <div>, <h1>, <p>, etc. > Not Normal : Flex > When flex is set, the outer display turns to block but the inner display is set to flex. > Inline Flex
  • 9. CSS Box Model - 2 Standart Box Model Alternative Box Model > In this model, the content area of box = (total-width of box - border / padding). > Can be set via: box-sizing: border-box > Applying everywhere only once: > Default > total width = content-area of box > padding & border are added separately. > Can be set via: box-sizing: content-box
  • 10. You know where to find me! webcrat.tech@gmail.com PS. Keep the subject line as: [ Web Dev BootCamp ‘ 20 ] Github @webber2408 LinkedIn @rahul-sharma-25b30b114 Medium @webcrat.tech
  • 11. References > Amazon.com > Undraw.co > Icons made by Freepik from www.flaticon.com > MDN (HTML): https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started > MDN (CSS - Important): https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks > W3Schools: https://www.w3schools.com/html/ > HTML Semantics: vikingcodeschool.com/html5-and-css3/html5-semantic-tags > WikiPedia: https://en.wikipedia.org/wiki/Semantic_HTML