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

PDF
CascadingStyleSheets in ONESHOT By DeathCodeYT .pdf
PPTX
Module 2 CSS . cascading style sheet and its uses
PPT
gdg_workshop 4 on web development HTML & CSS
PPTX
Cascading style sheets (CSS-Web Technology)
PPTX
CSS Topic wise Short notes ppt by Navya.E
PDF
2 introduction css
PPTX
Web programming css
PPTX
css3.pptx
CascadingStyleSheets in ONESHOT By DeathCodeYT .pdf
Module 2 CSS . cascading style sheet and its uses
gdg_workshop 4 on web development HTML & CSS
Cascading style sheets (CSS-Web Technology)
CSS Topic wise Short notes ppt by Navya.E
2 introduction css
Web programming css
css3.pptx

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

PPTX
Cordova training - Day 2 Introduction to CSS 3
PPTX
Cascading Style Sheets
PPT
PPTX
css3.0.( Cascading Style Sheets ) pptx
DOCX
Css Introduction
PDF
Css from scratch
PPT
6 css week12 2020 2021 for g10
PPT
CSS for basic learner
PPTX
CSS Cascade Style Sheet
PPTX
v5-introduction to html-css-210321161444.pptx
PDF
CSS Foundations, pt 2
PPTX
Designing for the web - 101
PPTX
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
PPTX
PDF
CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
PPT
Basic css
PPTX
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
PPTX
Beginners css tutorial for web designers
Cordova training - Day 2 Introduction to CSS 3
Cascading Style Sheets
css3.0.( Cascading Style Sheets ) pptx
Css Introduction
Css from scratch
6 css week12 2020 2021 for g10
CSS for basic learner
CSS Cascade Style Sheet
v5-introduction to html-css-210321161444.pptx
CSS Foundations, pt 2
Designing for the web - 101
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Basic css
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
Beginners css tutorial for web designers
Ad

Recently uploaded (20)

PDF
Hazard Identification & Risk Assessment .pdf
PPTX
Core Concepts of Personalized Learning and Virtual Learning Environments
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PPTX
Computer Architecture Input Output Memory.pptx
PPTX
Education and Perspectives of Education.pptx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
semiconductor packaging in vlsi design fab
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
English Textual Question & Ans (12th Class).pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
International_Financial_Reporting_Standa.pdf
PDF
Uderstanding digital marketing and marketing stratergie for engaging the digi...
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
Hazard Identification & Risk Assessment .pdf
Core Concepts of Personalized Learning and Virtual Learning Environments
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
Computer Architecture Input Output Memory.pptx
Education and Perspectives of Education.pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
semiconductor packaging in vlsi design fab
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Environmental Education MCQ BD2EE - Share Source.pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
English Textual Question & Ans (12th Class).pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
AI-driven educational solutions for real-life interventions in the Philippine...
International_Financial_Reporting_Standa.pdf
Uderstanding digital marketing and marketing stratergie for engaging the digi...
Unit 4 Computer Architecture Multicore Processor.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
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