SlideShare a Scribd company logo
WELCOME TO
LEARN at FLIGNO
2
HTML & CSS BASICS
CHAPTER 3: GET STARTED WITH CSS
LOGO
3
CHAPTER 3: GET STARTED WITH CSS
Learning Objectives
At the end of this chapter you should be able:
1. Learn and compare the three ways of inserting a
style sheet in an HTML document using CSS
2. Learn basic CSS Syntax
3. Learn and practice styling HTML using basic CSS
selectors
4
CHAPTER 3: GET STARTED WITH CSS
Learning Objectives
At the end of this chapter you should be able:
4. Learn basic CSS box model components
5. Learn CSS position property
6. Learn and practice styling HTML using CSS basic
text formatting properties
7. Learn and compare the basic CSS display
properties
LESSON 1
CASCADING STYLE SHEETS
6
CASCADING STYLE SHEETS
Including CSS in HTML Documents
When a browser reads a style sheet, it will format the HTML
document according to the information in the style sheet.
● Inline
● Internal
● External
Main Topic
7
CASCADING STYLE SHEETS
Inline CSS
By using the style
attribute inside HTML
elements
SubTopic
HTML View
8
CASCADING STYLE SHEETS
Inline CSS
By using the style
attribute inside HTML
elements
SubTopic
Web View
9
CASCADING STYLE SHEETS
Internal CSS
By using a <style>
element in the <head>
section
SubTopic
HTML View
10
CASCADING STYLE SHEETS
Internal CSS
By using a <style>
element in the <head>
section
SubTopic
Web View
11
CASCADING STYLE SHEETS
External CSS
By using a <link>
element to link to an
external CSS file (.css)
SubTopic
HTML View
12
CASCADING STYLE SHEETS
External CSS
By using a <link>
element to link to an
external CSS file(.css)
SubTopic
HTML View
LESSON 2
CSS SYNTAX
14
CSS SYNTAX
Understanding CSS Syntax
A CSS stylesheet consists of a set of rules that are
interpreted by the web browser and then applied to the
corresponding elements such as paragraphs, headings, etc.
in the document.
● Selector
● Declaration
● Property
● Value
● Writing Comments in Css
Main Topic
15
CSS SYNTAX
CSS Rule
1. Selector
2. Declaration
3. Property
4. Value
SubTopic
1 2
3 4
16
CSS SYNTAX
Writing Comments
In Css
A CSS comment
begins with /*, and
ends with */
SubTopic
HTML View
LESSON 3
CSS SELECTORS
18
CSS SELECTORS
What Is Selector?
A CSS selector is a pattern to match the elements on a web
page.
● CSS Element Selector
● CSS ID Selector
● CSS Class Selector
● CSS Universal Selector
● CSS Grouping Selector
Main Topic
19
CSS SELECTORS
CSS Element Selector
Selects HTML
elements based on the
element name.
SubTopic
HTML View
20
CSS SELECTORS
CSS Element Selector
Selects HTML
elements based on the
element name.
SubTopic
Web View
21
CSS SELECTORS
CSS ID Selector
Uses the id attribute of
an HTML element to
select a specific
element.
SubTopic
HTML View
22
CSS SELECTORS
CSS ID Selector
Uses the id attribute of
an HTML element to
select a specific
element.
SubTopic
Web View
23
CSS SELECTORS
CSS Class Selector
Selects HTML
elements with a
specific class attribute.
SubTopic
HTML View
24
CSS SELECTORS
CSS Class Selector
Selects HTML
elements with a
specific class attribute.
SubTopic
Web View
25
CSS SELECTORS
CSS Universal Selector
The universal selector
(*) selects all HTML
elements on the page
SubTopic
HTML View
26
CSS SELECTORS
CSS Universal Selector
The universal selector
(*) selects all HTML
elements on the page
SubTopic
Web View
27
CSS SELECTORS
CSS Grouping Selector
Selects all the HTML
elements with the
same style definitions.
SubTopic
HTML View
28
CSS SELECTORS
CSS Grouping Selector
Selects all the HTML
elements with the
same style definitions.
SubTopic
Web View
LESSON 4
CSS BOX MODEL, LAYOUT AND POSITION
30
CSS BOX MODEL,
LAYOUT AND POSITION
CSS Box Model
The box model allows us to add a border around elements,
and to define space between elements.
● Content
● Padding
● Border
● Margin
Main Topic
31
CSS Box Model
1. Content
2. Padding
3. Border
4. Margin
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
1 2
3 4
32
CSS BOX MODEL,
LAYOUT AND POSITION
CSS Borders
The CSS border properties allow you to specify the style,
width, and color of an element's border
● CSS Border Style
● CSS Border Width
● CSS Border Color
● CSS Rounded Borders
Main Topic
33
CSS Border Style
Specifies what kind of
border to display
● dotted
{border-style: dotted;}
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
HTML View
34
CSS Border Style
Specifies what kind of
border to display
● dotted
{border-style: dotted;}
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
35
CSS Border Style
Specifies what kind of
border to display
● solid
{border-style: solid;}
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
HTML View
36
CSS Border Style
Specifies what kind of
border to display
● solid
{border-style: solid;}
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
37
CSS Border Width
Specifies the width of
the four borders
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
HTML View
38
CSS Border Width
Specifies the width of
the four borders
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
39
CSS Border Color
Used to set the color
of the four borders.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
HTML View
40
CSS Border Color
Used to set the color
of the four borders.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
41
CSS Rounded Border
The border-radius
property is used to
add rounded borders
to an element.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
42
CSS BOX MODEL,
LAYOUT AND POSITION
CSS Margins
Margins are used to create space around elements, outside
of any defined borders.
● margin-top, margin-right, margin-bottom ,margin-left
● the auto value
● the inherit value
Main Topic
43
CSS Margins
1. margin-top
2. margin-right
3. margin-bottom
4. margin-left
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
HTML View
1
2
3
4
44
CSS Margins
1. margin-top
2. margin-right
3. margin-bottom
4. margin-left
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View 1
2
3
4
45
The auto value
Set the margin
property to auto to
horizontally center the
element within its
container.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
HTML View
46
The auto value
Set the margin
property to auto to
horizontally center the
element within its
container.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
47
The inherit value
Causes the element to
take the computed
value of the property
from its parent
element.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
HTML View
48
The inherit value
Causes the element to
take the computed
value of the property
from its parent
element.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
49
CSS BOX MODEL,
LAYOUT AND POSITION
CSS Padding
The CSS padding properties are used to generate space
around an element's content, inside of any defined borders.
● padding-top
● padding-right
● padding-bottom
● padding-left
Main Topic
50
CSS Padding
1. padding-top
2. padding-right
3. padding-bottom
4. padding-left
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
HTML View
1
2
3
4
51
CSS Padding
1. padding-top
2. padding-right
3. padding-bottom
4. padding-left
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
1
2
3
4
52
CSS BOX MODEL,
LAYOUT AND POSITION
CSS Layout -The Position Property
The position property specifies the type of positioning
method used for an element.
● static
● relative
● fixed
● absolute
● sticky
Main Topic
53
Position: Static;
HTML elements are
positioned static by
default.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Html View
54
Position: Static;
HTML elements are
positioned static by
default.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
55
Position: Relative;
An element with
position: relative; is
positioned relative to
its normal position.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Html View
56
Position: Relative;
An element with
position: relative; is
positioned relative to
its normal position.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
57
Position: Fixed;
Positioned relative to
the viewport, which
means it always stays
in the same place
even if the page is
scrolled.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Html View
58
Position: Fixed;
Positioned relative to
the viewport, which
means it always stays
in the same place
even if the page is
scrolled.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
59
Position: Absolute;
Positioned relative to
the nearest positioned
ancestor.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Html View
60
Position: Absolute;
Positioned relative to
the nearest positioned
ancestor.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
61
Position: Sticky;
Positioned based on
the user's scroll
position.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Html View
62
Position: Sticky;
Positioned based on
the user's scroll
position.
CSS BOX MODEL,
LAYOUT AND POSITION
SubTopic
Web View
LESSON 5
CSS TEXT FORMATTING PROPERTIES
64
CSS TEXT FORMATTING PROPERTIES
Formatting Text with CSS
These properties give you precise control over the visual
appearance of the characters, words, spaces, and so on
● CSS Text Color
● Text Color and Background Color
Main Topic
65
CSS TEXT FORMATTING PROPERTIES
CSS Text Color
Used to set the color
of the text
SubTopic
Html View
66
CSS TEXT FORMATTING PROPERTIES
CSS Text Color
Used to set the color
of the text
SubTopic
Web View
67
CSS TEXT FORMATTING PROPERTIES
Text Color and
Background Color
Define both the
background-color
property and the color
property.
SubTopic
Html View
68
CSS TEXT FORMATTING PROPERTIES
Text Color and
Background Color
Define both the
background-color
property and the color
property.
SubTopic
Web View
69
CSS TEXT FORMATTING PROPERTIES
CSS Fonts, Style , Weight, Variant, Size
These properties give you precise control over the visual
appearance of the characters, words, spaces, and so on.
● The CSS Font Family Property
● CSS Web Safe Fonts
● CSS Font style
● CSS Font weight
● CSS Font variant
● CSS Font size
Main Topic
70
CSS TEXT FORMATTING PROPERTIES
Generic Font Families
● Serif
● Sans-serif
● Monospace
● Cursive
● Fantasy
SubTopic
71
CSS TEXT FORMATTING PROPERTIES
The CSS Font Family
Property
Use to specify the font
of a text
SubTopic
Html View
72
CSS TEXT FORMATTING PROPERTIES
The CSS Font Family
Property
Use to specify the font
of a text
SubTopic
Web View
73
CSS TEXT FORMATTING PROPERTIES
CSS Web safe fonts
Universally installed
across all browsers
and devices.
● Georgia (serif)
SubTopic
HTML View
74
CSS TEXT FORMATTING PROPERTIES
CSS Web safe fonts
Universally installed
across all browsers
and devices.
● Georgia (serif)
SubTopic
Web View
75
CSS TEXT FORMATTING PROPERTIES
CSS Font style
Mostly used to specify
italic text.
● italic
SubTopic
Web View
76
CSS TEXT FORMATTING PROPERTIES
CSS Font style
Mostly used to specify
italic text.
● italic
SubTopic
Web View
77
CSS TEXT FORMATTING PROPERTIES
CSS Font Weight
Specifies the weight of
a font.
SubTopic
Html View
78
CSS TEXT FORMATTING PROPERTIES
CSS Font Weight
Specifies the weight of
a font.
SubTopic
Web View
79
CSS TEXT FORMATTING PROPERTIES
CSS Font Variant
Specifies whether or
not a text should be
displayed in a small-
caps font.
SubTopic
Html View
80
CSS TEXT FORMATTING PROPERTIES
CSS Font Variant
Specifies whether or
not a text should be
displayed in a small-
caps font.
SubTopic
Web View
81
CSS TEXT FORMATTING PROPERTIES
CSS Font size
Sets the size of the
text.
If you use pixels, you
can still use the zoom
tool to resize the
entire page.
SubTopic
HTML View
82
CSS TEXT FORMATTING PROPERTIES
CSS Font size
Sets the size of the
text.
To allow users to
resize the text (in the
browser menu), many
developers use em
instead of pixels.
pixels/16=em
SubTopic
HTML View
83
CSS TEXT FORMATTING PROPERTIES
CSS Font size
Sets the size of the
text.
The text size can be
set with a vw unit,
which means the
"viewport width". The
text size will follow the
size of the browser
window.
SubTopic
HTML View
84
CSS TEXT FORMATTING PROPERTIES
CSS Text Alignment
The text-align property is used to set the horizontal
alignment of a text.
● Text-align: center
● Text-align: left
● Text-align: right
● Text-align: justify
● Text-align: last
Main Topic
85
CSS TEXT FORMATTING PROPERTIES
CSS Text Alignment
1. Text-align: center
2. Text-align: left
3. Text-align: right
SubTopic
HTML View
1
2
3
86
CSS TEXT FORMATTING PROPERTIES
CSS Text Alignment
1. Text-align: center
2. Text-align: left
3. Text-align: right
SubTopic
Web View
87
CSS TEXT FORMATTING PROPERTIES
Text-align: justify
Stretches the lines so
that each line has
equal width
SubTopic
HTML View
88
CSS TEXT FORMATTING PROPERTIES
Text-align: justify
Stretches the lines so
that each line has
equal width
SubTopic
Web View
89
CSS TEXT FORMATTING PROPERTIES
Text-align: last
Specifies how to align
the last line of a text.
SubTopic
HTML View
90
CSS TEXT FORMATTING PROPERTIES
Text-align: last
Specifies how to align
the last line of a text.
SubTopic
Web View
LESSON 6
CSS DISPLAY PROPERTIES
92
CSS DISPLAY PROPERTIES
The Display Property
The display property specifies if/how an element is
displayed.
● Display Block
● Display Inline
● Display Inline-Block
Main Topic
93
CSS TEXT FORMATTING PROPERTIES
Display Block
Takes as much as
horizontal space as
they can.
SubTopic
Web View
94
CSS TEXT FORMATTING PROPERTIES
Display Inline
Takes the required
width only.
SubTopic
Web View
95
CSS TEXT FORMATTING PROPERTIES
Display Inline-Block
Able to set the width
and height.
SubTopic
Web View
Any Questions?

More Related Content

Similar to CHAPTER 3_ Getting Started with CSS Module (20)

CSS
CSSCSS
CSS
People Strategists
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Senthil Kumar
 
Css
CssCss
Css
Doeun KOCH
 
css3.0.( Cascading Style Sheets ) pptx
css3.0.( Cascading  Style  Sheets ) pptxcss3.0.( Cascading  Style  Sheets ) pptx
css3.0.( Cascading Style Sheets ) pptx
neelkamal72809
 
Css Introduction
Css IntroductionCss Introduction
Css Introduction
SathyaseelanK1
 
Css from scratch
Css from scratchCss from scratch
Css from scratch
Ahmad Al-ammar
 
6 css week12 2020 2021 for g10
6 css week12 2020 2021 for g106 css week12 2020 2021 for g10
6 css week12 2020 2021 for g10
Osama Ghandour Geris
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learner
Yoeung Vibol
 
Css
CssCss
Css
BalaKrishna Kolliboina
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
Adeel Rasheed
 
v5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptxv5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Shawn Calvert
 
Designing for the web - 101
Designing for the web - 101Designing for the web - 101
Designing for the web - 101
Ashraf Hamdy
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
html-css
html-csshtml-css
html-css
Dhirendra Chauhan
 
Basic css
Basic cssBasic css
Basic css
Gopinath Ambothi
 
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboiUNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
utsavsd11
 
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
 
Webpage style with CSS
Webpage style with CSSWebpage style with CSS
Webpage style with CSS
Hemant Patidar
 
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
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Senthil Kumar
 
css3.0.( Cascading Style Sheets ) pptx
css3.0.( Cascading  Style  Sheets ) pptxcss3.0.( Cascading  Style  Sheets ) pptx
css3.0.( Cascading Style Sheets ) pptx
neelkamal72809
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learner
Yoeung Vibol
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
Adeel Rasheed
 
v5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptxv5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Shawn Calvert
 
Designing for the web - 101
Designing for the web - 101Designing for the web - 101
Designing for the web - 101
Ashraf Hamdy
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboiUNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
utsavsd11
 
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
 
Webpage style with CSS
Webpage style with CSSWebpage style with CSS
Webpage style with CSS
Hemant Patidar
 
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
 

Recently uploaded (20)

How to Use Owl Slots in Odoo 17 - Odoo Slides
How to Use Owl Slots in Odoo 17 - Odoo SlidesHow to Use Owl Slots in Odoo 17 - Odoo Slides
How to Use Owl Slots in Odoo 17 - Odoo Slides
Celine George
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
Order: Odonata Isoptera and Thysanoptera.pptx
Order: Odonata Isoptera and Thysanoptera.pptxOrder: Odonata Isoptera and Thysanoptera.pptx
Order: Odonata Isoptera and Thysanoptera.pptx
Arshad Shaikh
 
Exploring Identity Through Colombian Companies
Exploring Identity Through Colombian CompaniesExploring Identity Through Colombian Companies
Exploring Identity Through Colombian Companies
OlgaLeonorTorresSnch
 
How to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guidesHow to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guides
Celine George
 
How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18
Celine George
 
K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910
PankajRodey1
 
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar SirPHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
Diwakar Kashyap
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website SuccessSearch Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
Introduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdfIntroduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdf
CME4Life
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly WorkshopsLDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDM & Mia eStudios
 
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
Sritoma Majumder
 
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo SlidesHow to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
Celine George
 
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATIONTHE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
PROF. PAUL ALLIEU KAMARA
 
How to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time OffHow to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time Off
Celine George
 
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGYHUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
DHARMENDRA SAHU
 
Writing Research Papers: Guidance for Research Community
Writing Research Papers: Guidance for Research CommunityWriting Research Papers: Guidance for Research Community
Writing Research Papers: Guidance for Research Community
Rishi Bankim Chandra Evening College, Naihati, North 24 Parganas, West Bengal, India
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
How to Use Owl Slots in Odoo 17 - Odoo Slides
How to Use Owl Slots in Odoo 17 - Odoo SlidesHow to Use Owl Slots in Odoo 17 - Odoo Slides
How to Use Owl Slots in Odoo 17 - Odoo Slides
Celine George
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
Order: Odonata Isoptera and Thysanoptera.pptx
Order: Odonata Isoptera and Thysanoptera.pptxOrder: Odonata Isoptera and Thysanoptera.pptx
Order: Odonata Isoptera and Thysanoptera.pptx
Arshad Shaikh
 
Exploring Identity Through Colombian Companies
Exploring Identity Through Colombian CompaniesExploring Identity Through Colombian Companies
Exploring Identity Through Colombian Companies
OlgaLeonorTorresSnch
 
How to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guidesHow to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guides
Celine George
 
How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18
Celine George
 
K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910
PankajRodey1
 
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar SirPHYSIOLOGY & SPORTS INJURY by Diwakar Sir
PHYSIOLOGY & SPORTS INJURY by Diwakar Sir
Diwakar Kashyap
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website SuccessSearch Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
Introduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdfIntroduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdf
CME4Life
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly WorkshopsLDMMIA Free Reiki Yoga S7 Weekly Workshops
LDMMIA Free Reiki Yoga S7 Weekly Workshops
LDM & Mia eStudios
 
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
Sritoma Majumder
 
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo SlidesHow to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
Celine George
 
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATIONTHE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
PROF. PAUL ALLIEU KAMARA
 
How to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time OffHow to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time Off
Celine George
 
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGYHUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
DHARMENDRA SAHU
 
Ad

CHAPTER 3_ Getting Started with CSS Module

  • 2. 2 HTML & CSS BASICS CHAPTER 3: GET STARTED WITH CSS LOGO
  • 3. 3 CHAPTER 3: GET STARTED WITH CSS Learning Objectives At the end of this chapter you should be able: 1. Learn and compare the three ways of inserting a style sheet in an HTML document using CSS 2. Learn basic CSS Syntax 3. Learn and practice styling HTML using basic CSS selectors
  • 4. 4 CHAPTER 3: GET STARTED WITH CSS Learning Objectives At the end of this chapter you should be able: 4. Learn basic CSS box model components 5. Learn CSS position property 6. Learn and practice styling HTML using CSS basic text formatting properties 7. Learn and compare the basic CSS display properties
  • 6. 6 CASCADING STYLE SHEETS Including CSS in HTML Documents When a browser reads a style sheet, it will format the HTML document according to the information in the style sheet. ● Inline ● Internal ● External Main Topic
  • 7. 7 CASCADING STYLE SHEETS Inline CSS By using the style attribute inside HTML elements SubTopic HTML View
  • 8. 8 CASCADING STYLE SHEETS Inline CSS By using the style attribute inside HTML elements SubTopic Web View
  • 9. 9 CASCADING STYLE SHEETS Internal CSS By using a <style> element in the <head> section SubTopic HTML View
  • 10. 10 CASCADING STYLE SHEETS Internal CSS By using a <style> element in the <head> section SubTopic Web View
  • 11. 11 CASCADING STYLE SHEETS External CSS By using a <link> element to link to an external CSS file (.css) SubTopic HTML View
  • 12. 12 CASCADING STYLE SHEETS External CSS By using a <link> element to link to an external CSS file(.css) SubTopic HTML View
  • 14. 14 CSS SYNTAX Understanding CSS Syntax A CSS stylesheet consists of a set of rules that are interpreted by the web browser and then applied to the corresponding elements such as paragraphs, headings, etc. in the document. ● Selector ● Declaration ● Property ● Value ● Writing Comments in Css Main Topic
  • 15. 15 CSS SYNTAX CSS Rule 1. Selector 2. Declaration 3. Property 4. Value SubTopic 1 2 3 4
  • 16. 16 CSS SYNTAX Writing Comments In Css A CSS comment begins with /*, and ends with */ SubTopic HTML View
  • 18. 18 CSS SELECTORS What Is Selector? A CSS selector is a pattern to match the elements on a web page. ● CSS Element Selector ● CSS ID Selector ● CSS Class Selector ● CSS Universal Selector ● CSS Grouping Selector Main Topic
  • 19. 19 CSS SELECTORS CSS Element Selector Selects HTML elements based on the element name. SubTopic HTML View
  • 20. 20 CSS SELECTORS CSS Element Selector Selects HTML elements based on the element name. SubTopic Web View
  • 21. 21 CSS SELECTORS CSS ID Selector Uses the id attribute of an HTML element to select a specific element. SubTopic HTML View
  • 22. 22 CSS SELECTORS CSS ID Selector Uses the id attribute of an HTML element to select a specific element. SubTopic Web View
  • 23. 23 CSS SELECTORS CSS Class Selector Selects HTML elements with a specific class attribute. SubTopic HTML View
  • 24. 24 CSS SELECTORS CSS Class Selector Selects HTML elements with a specific class attribute. SubTopic Web View
  • 25. 25 CSS SELECTORS CSS Universal Selector The universal selector (*) selects all HTML elements on the page SubTopic HTML View
  • 26. 26 CSS SELECTORS CSS Universal Selector The universal selector (*) selects all HTML elements on the page SubTopic Web View
  • 27. 27 CSS SELECTORS CSS Grouping Selector Selects all the HTML elements with the same style definitions. SubTopic HTML View
  • 28. 28 CSS SELECTORS CSS Grouping Selector Selects all the HTML elements with the same style definitions. SubTopic Web View
  • 29. LESSON 4 CSS BOX MODEL, LAYOUT AND POSITION
  • 30. 30 CSS BOX MODEL, LAYOUT AND POSITION CSS Box Model The box model allows us to add a border around elements, and to define space between elements. ● Content ● Padding ● Border ● Margin Main Topic
  • 31. 31 CSS Box Model 1. Content 2. Padding 3. Border 4. Margin CSS BOX MODEL, LAYOUT AND POSITION SubTopic 1 2 3 4
  • 32. 32 CSS BOX MODEL, LAYOUT AND POSITION CSS Borders The CSS border properties allow you to specify the style, width, and color of an element's border ● CSS Border Style ● CSS Border Width ● CSS Border Color ● CSS Rounded Borders Main Topic
  • 33. 33 CSS Border Style Specifies what kind of border to display ● dotted {border-style: dotted;} CSS BOX MODEL, LAYOUT AND POSITION SubTopic HTML View
  • 34. 34 CSS Border Style Specifies what kind of border to display ● dotted {border-style: dotted;} CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 35. 35 CSS Border Style Specifies what kind of border to display ● solid {border-style: solid;} CSS BOX MODEL, LAYOUT AND POSITION SubTopic HTML View
  • 36. 36 CSS Border Style Specifies what kind of border to display ● solid {border-style: solid;} CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 37. 37 CSS Border Width Specifies the width of the four borders CSS BOX MODEL, LAYOUT AND POSITION SubTopic HTML View
  • 38. 38 CSS Border Width Specifies the width of the four borders CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 39. 39 CSS Border Color Used to set the color of the four borders. CSS BOX MODEL, LAYOUT AND POSITION SubTopic HTML View
  • 40. 40 CSS Border Color Used to set the color of the four borders. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 41. 41 CSS Rounded Border The border-radius property is used to add rounded borders to an element. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 42. 42 CSS BOX MODEL, LAYOUT AND POSITION CSS Margins Margins are used to create space around elements, outside of any defined borders. ● margin-top, margin-right, margin-bottom ,margin-left ● the auto value ● the inherit value Main Topic
  • 43. 43 CSS Margins 1. margin-top 2. margin-right 3. margin-bottom 4. margin-left CSS BOX MODEL, LAYOUT AND POSITION SubTopic HTML View 1 2 3 4
  • 44. 44 CSS Margins 1. margin-top 2. margin-right 3. margin-bottom 4. margin-left CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View 1 2 3 4
  • 45. 45 The auto value Set the margin property to auto to horizontally center the element within its container. CSS BOX MODEL, LAYOUT AND POSITION SubTopic HTML View
  • 46. 46 The auto value Set the margin property to auto to horizontally center the element within its container. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 47. 47 The inherit value Causes the element to take the computed value of the property from its parent element. CSS BOX MODEL, LAYOUT AND POSITION SubTopic HTML View
  • 48. 48 The inherit value Causes the element to take the computed value of the property from its parent element. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 49. 49 CSS BOX MODEL, LAYOUT AND POSITION CSS Padding The CSS padding properties are used to generate space around an element's content, inside of any defined borders. ● padding-top ● padding-right ● padding-bottom ● padding-left Main Topic
  • 50. 50 CSS Padding 1. padding-top 2. padding-right 3. padding-bottom 4. padding-left CSS BOX MODEL, LAYOUT AND POSITION SubTopic HTML View 1 2 3 4
  • 51. 51 CSS Padding 1. padding-top 2. padding-right 3. padding-bottom 4. padding-left CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View 1 2 3 4
  • 52. 52 CSS BOX MODEL, LAYOUT AND POSITION CSS Layout -The Position Property The position property specifies the type of positioning method used for an element. ● static ● relative ● fixed ● absolute ● sticky Main Topic
  • 53. 53 Position: Static; HTML elements are positioned static by default. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Html View
  • 54. 54 Position: Static; HTML elements are positioned static by default. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 55. 55 Position: Relative; An element with position: relative; is positioned relative to its normal position. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Html View
  • 56. 56 Position: Relative; An element with position: relative; is positioned relative to its normal position. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 57. 57 Position: Fixed; Positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Html View
  • 58. 58 Position: Fixed; Positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 59. 59 Position: Absolute; Positioned relative to the nearest positioned ancestor. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Html View
  • 60. 60 Position: Absolute; Positioned relative to the nearest positioned ancestor. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 61. 61 Position: Sticky; Positioned based on the user's scroll position. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Html View
  • 62. 62 Position: Sticky; Positioned based on the user's scroll position. CSS BOX MODEL, LAYOUT AND POSITION SubTopic Web View
  • 63. LESSON 5 CSS TEXT FORMATTING PROPERTIES
  • 64. 64 CSS TEXT FORMATTING PROPERTIES Formatting Text with CSS These properties give you precise control over the visual appearance of the characters, words, spaces, and so on ● CSS Text Color ● Text Color and Background Color Main Topic
  • 65. 65 CSS TEXT FORMATTING PROPERTIES CSS Text Color Used to set the color of the text SubTopic Html View
  • 66. 66 CSS TEXT FORMATTING PROPERTIES CSS Text Color Used to set the color of the text SubTopic Web View
  • 67. 67 CSS TEXT FORMATTING PROPERTIES Text Color and Background Color Define both the background-color property and the color property. SubTopic Html View
  • 68. 68 CSS TEXT FORMATTING PROPERTIES Text Color and Background Color Define both the background-color property and the color property. SubTopic Web View
  • 69. 69 CSS TEXT FORMATTING PROPERTIES CSS Fonts, Style , Weight, Variant, Size These properties give you precise control over the visual appearance of the characters, words, spaces, and so on. ● The CSS Font Family Property ● CSS Web Safe Fonts ● CSS Font style ● CSS Font weight ● CSS Font variant ● CSS Font size Main Topic
  • 70. 70 CSS TEXT FORMATTING PROPERTIES Generic Font Families ● Serif ● Sans-serif ● Monospace ● Cursive ● Fantasy SubTopic
  • 71. 71 CSS TEXT FORMATTING PROPERTIES The CSS Font Family Property Use to specify the font of a text SubTopic Html View
  • 72. 72 CSS TEXT FORMATTING PROPERTIES The CSS Font Family Property Use to specify the font of a text SubTopic Web View
  • 73. 73 CSS TEXT FORMATTING PROPERTIES CSS Web safe fonts Universally installed across all browsers and devices. ● Georgia (serif) SubTopic HTML View
  • 74. 74 CSS TEXT FORMATTING PROPERTIES CSS Web safe fonts Universally installed across all browsers and devices. ● Georgia (serif) SubTopic Web View
  • 75. 75 CSS TEXT FORMATTING PROPERTIES CSS Font style Mostly used to specify italic text. ● italic SubTopic Web View
  • 76. 76 CSS TEXT FORMATTING PROPERTIES CSS Font style Mostly used to specify italic text. ● italic SubTopic Web View
  • 77. 77 CSS TEXT FORMATTING PROPERTIES CSS Font Weight Specifies the weight of a font. SubTopic Html View
  • 78. 78 CSS TEXT FORMATTING PROPERTIES CSS Font Weight Specifies the weight of a font. SubTopic Web View
  • 79. 79 CSS TEXT FORMATTING PROPERTIES CSS Font Variant Specifies whether or not a text should be displayed in a small- caps font. SubTopic Html View
  • 80. 80 CSS TEXT FORMATTING PROPERTIES CSS Font Variant Specifies whether or not a text should be displayed in a small- caps font. SubTopic Web View
  • 81. 81 CSS TEXT FORMATTING PROPERTIES CSS Font size Sets the size of the text. If you use pixels, you can still use the zoom tool to resize the entire page. SubTopic HTML View
  • 82. 82 CSS TEXT FORMATTING PROPERTIES CSS Font size Sets the size of the text. To allow users to resize the text (in the browser menu), many developers use em instead of pixels. pixels/16=em SubTopic HTML View
  • 83. 83 CSS TEXT FORMATTING PROPERTIES CSS Font size Sets the size of the text. The text size can be set with a vw unit, which means the "viewport width". The text size will follow the size of the browser window. SubTopic HTML View
  • 84. 84 CSS TEXT FORMATTING PROPERTIES CSS Text Alignment The text-align property is used to set the horizontal alignment of a text. ● Text-align: center ● Text-align: left ● Text-align: right ● Text-align: justify ● Text-align: last Main Topic
  • 85. 85 CSS TEXT FORMATTING PROPERTIES CSS Text Alignment 1. Text-align: center 2. Text-align: left 3. Text-align: right SubTopic HTML View 1 2 3
  • 86. 86 CSS TEXT FORMATTING PROPERTIES CSS Text Alignment 1. Text-align: center 2. Text-align: left 3. Text-align: right SubTopic Web View
  • 87. 87 CSS TEXT FORMATTING PROPERTIES Text-align: justify Stretches the lines so that each line has equal width SubTopic HTML View
  • 88. 88 CSS TEXT FORMATTING PROPERTIES Text-align: justify Stretches the lines so that each line has equal width SubTopic Web View
  • 89. 89 CSS TEXT FORMATTING PROPERTIES Text-align: last Specifies how to align the last line of a text. SubTopic HTML View
  • 90. 90 CSS TEXT FORMATTING PROPERTIES Text-align: last Specifies how to align the last line of a text. SubTopic Web View
  • 91. LESSON 6 CSS DISPLAY PROPERTIES
  • 92. 92 CSS DISPLAY PROPERTIES The Display Property The display property specifies if/how an element is displayed. ● Display Block ● Display Inline ● Display Inline-Block Main Topic
  • 93. 93 CSS TEXT FORMATTING PROPERTIES Display Block Takes as much as horizontal space as they can. SubTopic Web View
  • 94. 94 CSS TEXT FORMATTING PROPERTIES Display Inline Takes the required width only. SubTopic Web View
  • 95. 95 CSS TEXT FORMATTING PROPERTIES Display Inline-Block Able to set the width and height. SubTopic Web View