SlideShare uma empresa Scribd 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?

Mais conteúdo relacionado

Semelhante a CHAPTER 3_ Getting Started with CSS Module

Web Technology
Web TechnologyWeb Technology
Web Technology
Kirti H Mandal
 
Css.html
Css.htmlCss.html
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
GmachImen
 
Fewd week2 slides
Fewd week2 slidesFewd week2 slides
Fewd week2 slides
William Myers
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandour
Osama Ghandour Geris
 
The CSS Handbook
The CSS HandbookThe CSS Handbook
The CSS Handbook
jackchenvlo
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
ispkosova
 
DW unit 3.pptx
DW unit 3.pptxDW unit 3.pptx
DW unit 3.pptx
SeethaDinesh
 
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 2Erin M. Kidwell
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
Webtech Learning
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
Binu Paul
 
slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
MonkeyDLuffy708724
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
Swapnali Pawar
 
The Future is Modular, Jonathan Snook
The Future is Modular, Jonathan SnookThe Future is Modular, Jonathan Snook
The Future is Modular, Jonathan Snook
Future Insights
 
Css intro
Css introCss intro
Css intro
Julia Vi
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
elayelily
 
Css introduction
Css  introductionCss  introduction
Css introduction
vishnu murthy
 
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.ppt
css.pptcss.ppt

Semelhante a CHAPTER 3_ Getting Started with CSS Module (20)

Web Technology
Web TechnologyWeb Technology
Web Technology
 
Css.html
Css.htmlCss.html
Css.html
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
 
Fewd week2 slides
Fewd week2 slidesFewd week2 slides
Fewd week2 slides
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandour
 
The CSS Handbook
The CSS HandbookThe CSS Handbook
The CSS Handbook
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
DW unit 3.pptx
DW unit 3.pptxDW unit 3.pptx
DW unit 3.pptx
 
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
 
Web
WebWeb
Web
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
 
slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
 
The Future is Modular, Jonathan Snook
The Future is Modular, Jonathan SnookThe Future is Modular, Jonathan Snook
The Future is Modular, Jonathan Snook
 
Css intro
Css introCss intro
Css intro
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
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.ppt
css.pptcss.ppt
css.ppt
 

Último

Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 

Último (20)

Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 

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