SlideShare a Scribd company logo
2
Most read
3
Most read
21
Most read
Cascading style sheet
 CSS stands for Cascading Style Sheets 
 Styles define how to display HTML elements 
 External Style Sheets can save a lot of work 
 External Style Sheets are stored in CSS files
 CSS selectors allow you to select and 
manipulate HTML element(s). 
 CSS selectors are used to "find" (or select) 
HTML elements based on their id, classes, 
types, attributes, values of attributes and 
much more.
 CLASS define with a “.” 
 ID define with a “#”
 External style sheet 
 Internal style sheet 
 Inline style
 An external style sheet is ideal when the 
style is applied to many pages. With an 
external style sheet, you can change the look 
of an entire Web site by changing just one 
file. 
 Each page must include a link to the style 
sheet with the <link> tag. The <link> tag goes 
inside the head section.
 An internal style sheet should be used when 
a single document has a unique style. 
 You define internal styles in the head 
section of an HTML page, inside the <style> 
tag.
 An inline style loses many of the advantages 
of a style sheet (by mixing content with 
presentation). Use this method sparingly! 
 To use inline styles, add the style attribute to 
the relevant tag. The style attribute can 
contain any CSS property. The example shows 
how to change the color and the left margin 
of a h1 element.
 Background Color 
 body {background-color:#b0c4de;} 
 Background Image: 
 body {background-image:url('paper.gif');}
 The background-color property specifies the 
background color of an element. 
 The background color of a page is defined in 
the body selector 
 For Example 
body 
{ 
background-color: #b0c4de; 
}
 The background-image property specifies an 
image to use as the background of an 
element. 
 By default, the image is repeated so it covers 
the entire element. 
 For Example 
body 
{ 
background-image: url("paper.gif"); 
}
 Links can be styled with any CSS property (e.g. 
color, font-family, background, etc.). 
 In addition, links can be styled differently 
depending on what state they are in. 
 The four links states are: 
 a:link - a normal, unvisited link 
 a:visited - a link the user has visited 
 a:hover - a link when the user mouses over it 
 a:active - a link the moment it is clicked
/* unvisited link */ 
a:link { 
color: #FF0000; 
} 
/* visited link */ 
a:visited { 
color: #00FF00; 
} 
/* mouse over link */ 
a:hover { 
color: #FF00FF; 
} 
/* selected link */ 
a:active { 
color: #0000FF; 
}
 The CSS list properties allow you to: 
1) Set different list item markers for 
ordered lists 
2) Set different list item markers for 
unordered lists 
3) Set an image as the list item marker
 In HTML, there are two types of lists: 
1) unordered lists - the list items are 
marked with bullets 
2) ordered lists - the list items are marked 
with numbers or letters
 The CSS border properties allow you to 
specify the style, size, and color of an 
element's border.
 The padding clears an area around the 
content (inside the border) of an element. 
The padding is affected by the background 
color of the element. 
 The top, right, bottom, and left padding can 
be changed independently using separate 
properties. A shorthand padding property can 
also be used, to change all paddings at once.
 For Example 
p 
{ 
padding-top: 25px; 
padding-right: 50px; 
padding-bottom: 25px; 
padding-left: 50px; 
}
 The margin clears an area around an element 
(outside the border). The margin does not 
have a background color, and is completely 
transparent. 
 The top, right, bottom, and left margin can 
be changed independently using separate 
properties. A shorthand margin property can 
also be used, to change all margins at once.
 For Example 
p 
{ 
margin-top: 100px; 
margin-bottom: 100px; 
margin-right: 150px; 
margin-left: 50px; 
}
Cascading style sheet

More Related Content

PPTX
HTML (Web) basics for a beginner
PPTX
Cascading Style Sheet (CSS)
PPTX
Cellular neural
PDF
Intro to Asynchronous Javascript
PDF
HTML and CSS crash course!
PPTX
Blockchain technology ppt
PPTX
Understanding REST APIs in 5 Simple Steps
PPTX
Data Mining : Concepts and Techniques
HTML (Web) basics for a beginner
Cascading Style Sheet (CSS)
Cellular neural
Intro to Asynchronous Javascript
HTML and CSS crash course!
Blockchain technology ppt
Understanding REST APIs in 5 Simple Steps
Data Mining : Concepts and Techniques

What's hot (20)

PPTX
An Overview of HTML, CSS & Java Script
PPTX
Html ppt
PPT
cascading style sheet ppt
PPT
Css Ppt
PPTX
Complete Lecture on Css presentation
PDF
Intro to HTML and CSS basics
PPTX
PPTX
Introduction to CSS
PPT
Introduction to CSS
PPTX
Cascading style sheets (CSS)
PPT
PPT
Span and Div tags in HTML
PPT
Intro Html
PPTX
Html ppt
PDF
HTML CSS Basics
PPT
Cascading Style Sheets (CSS) help
ODP
Introduction of Html/css/js
PPTX
(Fast) Introduction to HTML & CSS
An Overview of HTML, CSS & Java Script
Html ppt
cascading style sheet ppt
Css Ppt
Complete Lecture on Css presentation
Intro to HTML and CSS basics
Introduction to CSS
Introduction to CSS
Cascading style sheets (CSS)
Span and Div tags in HTML
Intro Html
Html ppt
HTML CSS Basics
Cascading Style Sheets (CSS) help
Introduction of Html/css/js
(Fast) Introduction to HTML & CSS
Ad

Viewers also liked (20)

PPT
Cascading Style Sheet
PPTX
Css ppt
PPT
ODP
PPTX
Week 12 CSS - Review from last week
PPT
Introduction to Cascading Style Sheets (CSS)
PDF
Html / CSS Presentation
PDF
Css from scratch
PPTX
Hushang Gaikwad
PPTX
HTML, CSS And JavaScript Training Institute in Ambala ! Batra Computer Centre
PDF
Efficient, maintainable CSS
PPT
Html & Css presentation
PPT
Getting Started with CSS
PPTX
Web Engineering - Basic CSS Properties
ODP
Cascading Style Sheets - Part 01
PPTX
Xml dtd
PPT
How Cascading Style Sheets (CSS) Works
PPT
Scripting languages
Cascading Style Sheet
Css ppt
Week 12 CSS - Review from last week
Introduction to Cascading Style Sheets (CSS)
Html / CSS Presentation
Css from scratch
Hushang Gaikwad
HTML, CSS And JavaScript Training Institute in Ambala ! Batra Computer Centre
Efficient, maintainable CSS
Html & Css presentation
Getting Started with CSS
Web Engineering - Basic CSS Properties
Cascading Style Sheets - Part 01
Xml dtd
How Cascading Style Sheets (CSS) Works
Scripting languages
Ad

Similar to Cascading style sheet (20)

PPTX
Beginners css tutorial for web designers
PPTX
CSS Basics part One
PPTX
CSS tutorial chapter 1
PPTX
CSS_Day_ONE (W3schools)
DOC
Css introduction
DOC
Css introduction
PPTX
chitra
PPTX
Introduction of css
PPTX
session2 cascading style sheet course.pptx
PPTX
session2 css cascade style sheet course.pptx
PPTX
session2_cascading_style_sheet_cssc.pptx
PPTX
PPTX
Web Programming-css.pptx
DOCX
Css Introduction
PDF
TUTORIAL DE CSS 2.0
PPT
Cascading style sheets
PPT
Cascading style sheets
PPTX
Cascading Style Sheets (CSS)
Beginners css tutorial for web designers
CSS Basics part One
CSS tutorial chapter 1
CSS_Day_ONE (W3schools)
Css introduction
Css introduction
chitra
Introduction of css
session2 cascading style sheet course.pptx
session2 css cascade style sheet course.pptx
session2_cascading_style_sheet_cssc.pptx
Web Programming-css.pptx
Css Introduction
TUTORIAL DE CSS 2.0
Cascading style sheets
Cascading style sheets
Cascading Style Sheets (CSS)

Recently uploaded (20)

DOCX
algorithm desgin technologycsecsecsecsecse
DOCX
The story of the first moon landing.docx
PPTX
Implications Existing phase plan and its feasibility.pptx
PDF
Wio LTE JP Version v1.3b- 4G, Cat.1, Espruino Compatible\202001935, PCBA;Wio ...
PPTX
Fundamental Principles of Visual Graphic Design.pptx
PPT
Package Design Design Kit 20100009 PWM IC by Bee Technologies
PDF
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PDF
10 Real World Lessons and 4 Practical Tips for Large Group LSP Method
PDF
Africa 2025 - Prospects and Challenges first edition.pdf
PDF
Benefits_of_Cast_Aluminium_Doors_Presentation.pdf
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPT
unit 1 ppt.ppthhhhhhhhhhhhhhhhhhhhhhhhhh
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PPTX
TLE-10-PPTHAJAOSBDJDEKSNbknbtktktmktkttk
PDF
URBAN DESIGN DESKTOP CASESTUDY IITG.pdf
PPT
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
PPTX
artificialintelligencedata driven analytics23.pptx
PPTX
building Planning Overview for step wise design.pptx
PDF
Phone away, tabs closed: No multitasking
algorithm desgin technologycsecsecsecsecse
The story of the first moon landing.docx
Implications Existing phase plan and its feasibility.pptx
Wio LTE JP Version v1.3b- 4G, Cat.1, Espruino Compatible\202001935, PCBA;Wio ...
Fundamental Principles of Visual Graphic Design.pptx
Package Design Design Kit 20100009 PWM IC by Bee Technologies
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
10 Real World Lessons and 4 Practical Tips for Large Group LSP Method
Africa 2025 - Prospects and Challenges first edition.pdf
Benefits_of_Cast_Aluminium_Doors_Presentation.pdf
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
unit 1 ppt.ppthhhhhhhhhhhhhhhhhhhhhhhhhh
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
TLE-10-PPTHAJAOSBDJDEKSNbknbtktktmktkttk
URBAN DESIGN DESKTOP CASESTUDY IITG.pdf
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
artificialintelligencedata driven analytics23.pptx
building Planning Overview for step wise design.pptx
Phone away, tabs closed: No multitasking

Cascading style sheet

  • 2.  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  External Style Sheets can save a lot of work  External Style Sheets are stored in CSS files
  • 3.  CSS selectors allow you to select and manipulate HTML element(s).  CSS selectors are used to "find" (or select) HTML elements based on their id, classes, types, attributes, values of attributes and much more.
  • 4.  CLASS define with a “.”  ID define with a “#”
  • 5.  External style sheet  Internal style sheet  Inline style
  • 6.  An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing just one file.  Each page must include a link to the style sheet with the <link> tag. The <link> tag goes inside the head section.
  • 7.  An internal style sheet should be used when a single document has a unique style.  You define internal styles in the head section of an HTML page, inside the <style> tag.
  • 8.  An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly!  To use inline styles, add the style attribute to the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a h1 element.
  • 9.  Background Color  body {background-color:#b0c4de;}  Background Image:  body {background-image:url('paper.gif');}
  • 10.  The background-color property specifies the background color of an element.  The background color of a page is defined in the body selector  For Example body { background-color: #b0c4de; }
  • 11.  The background-image property specifies an image to use as the background of an element.  By default, the image is repeated so it covers the entire element.  For Example body { background-image: url("paper.gif"); }
  • 12.  Links can be styled with any CSS property (e.g. color, font-family, background, etc.).  In addition, links can be styled differently depending on what state they are in.  The four links states are:  a:link - a normal, unvisited link  a:visited - a link the user has visited  a:hover - a link when the user mouses over it  a:active - a link the moment it is clicked
  • 13. /* unvisited link */ a:link { color: #FF0000; } /* visited link */ a:visited { color: #00FF00; } /* mouse over link */ a:hover { color: #FF00FF; } /* selected link */ a:active { color: #0000FF; }
  • 14.  The CSS list properties allow you to: 1) Set different list item markers for ordered lists 2) Set different list item markers for unordered lists 3) Set an image as the list item marker
  • 15.  In HTML, there are two types of lists: 1) unordered lists - the list items are marked with bullets 2) ordered lists - the list items are marked with numbers or letters
  • 16.  The CSS border properties allow you to specify the style, size, and color of an element's border.
  • 17.  The padding clears an area around the content (inside the border) of an element. The padding is affected by the background color of the element.  The top, right, bottom, and left padding can be changed independently using separate properties. A shorthand padding property can also be used, to change all paddings at once.
  • 18.  For Example p { padding-top: 25px; padding-right: 50px; padding-bottom: 25px; padding-left: 50px; }
  • 19.  The margin clears an area around an element (outside the border). The margin does not have a background color, and is completely transparent.  The top, right, bottom, and left margin can be changed independently using separate properties. A shorthand margin property can also be used, to change all margins at once.
  • 20.  For Example p { margin-top: 100px; margin-bottom: 100px; margin-right: 150px; margin-left: 50px; }