SlideShare a Scribd company logo
1 of 14
CASCADING STYLE
SHEET
(CSS)
 Objective
 Introduction to CSS
 What is CSS?
 CSS Syntax
 Types of CSS
 External Style Sheet
 Internal Style Sheet
 Inline Style
 Cascade order
 Advantages of CSS
 Conclusion
 “What is CSS?”
 Structure of CSS
 How to use CSS in your web page
• CSS(Cascading Style Sheet) was developed by Hakon
Wium Lie in 1996.
• HTML was originally designed as a simple way of
presenting information intended for sharing scientific
documents and research papers online.
• To improve web presentation capabilities CSS was
introduced by W3C (World Wide Web Consortium). It
was intended to allow web designers to define the look and
feel of their web pages, and to separate content from
document’s layout.
• CSS stands for “Cascading Style Sheets.”
• Cascading: refers to the procedure that determine which style
will apply to a certain section, if you have more than one style
rule.
• Style: how you want a certain part of your page to look. You
can set things like color, margins, font etc for things like tables,
paragraphs and headings.
• Sheets: the “sheets” are like templates, or a set of rules, for
determine how the web page will look.
So, CSS(all together) is a styling language-is set of rules to
tell browsers how your web page should look.
• The selector points to the HTML element you want to style.
• The declaration block contain one or more declarations
separated by semicolons.
• Each declaration includes a CSS property name and a value,
separated by colon.
•A CSS declaration always ends with a semicolon, and
declaration blocks are surrounded by curly braces.
There are three types of cascading style sheets:
1. External style sheet
2. Internal style sheet
3. Inline style
• Ideal when applied to many pages.
• Syntax:
<head>
<link rel=“stylesheet” type=“text/css”
href=“mystyle.css”/>
</head>
•An external style sheet can be written in any text editor.
• Your style sheet should be saved with a .css extension.
• Eg.
hr{ color : blue; }
p{ margin-left : 20px; }
body{ background-image : url(“images/back40.gif”); }
• It should be used when a single document has a unique style.
• You can define internal styles in the head section of an HTML
page, by using the <style> tag, like this-
• E.g.
<head>
<style type=“text/css”>
hr{ color : blue; }
p{ margin-left : 20px; }
body{ background-image : url(“images/back40.gif”); }
</style>
</head>
•An Inline style loses many of the advantages of style
sheet.
• To use inline styles, add the style attribute to the relevant
tag.
• The style attribute can contain any css property.
• E.g.
<h1 style=“color : blue; margin-left:20px;”>This is a
heading</h1>
• What style will be used when there is more than one style
specified for an HTML element?
•All the style will “Cascade” into a new “virtual” style sheet
by the following rules, where number one has the highest
priority:
 Inline style(inside an HTML element)
 External and Internal style sheets(in the head
section)
•Allows separating content of an HTML document from the style
and layout of that document.
• Make documents much easier to maintain and give much better
control over the layout of your web pages.
• CSS saves lots of time
• Easy maintenance
• Pages load faster
• Superior styles to HTML
• Multiple device compatibility
In this presentation we’ve learned
that how to create style sheets to
control the style and layout of
multiple web sites at once.
Submitted to: Sir Vikas Somani

More Related Content

What's hot

1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
apnwebdev
 

What's hot (20)

CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Css selectors
Css selectorsCss selectors
Css selectors
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
Css pseudo-classes
Css pseudo-classesCss pseudo-classes
Css pseudo-classes
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Css
CssCss
Css
 
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
 
Css ppt
Css pptCss ppt
Css ppt
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Html basics
Html basicsHtml basics
Html basics
 
Css
CssCss
Css
 
Introduction to css & its attributes with syntax
Introduction to css & its attributes with syntaxIntroduction to css & its attributes with syntax
Introduction to css & its attributes with syntax
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Html ppt
Html pptHtml ppt
Html ppt
 
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)
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
Background property in css
Background property in cssBackground property in css
Background property in css
 

Similar to Cascading style sheets (CSS)

Cascading style sheet (css)]
Cascading style sheet (css)]Cascading style sheet (css)]
Cascading style sheet (css)]
9574395990
 
Castro Chapter 8
Castro Chapter 8Castro Chapter 8
Castro Chapter 8
Jeff Byrnes
 
Web programming css
Web programming cssWeb programming css
Web programming css
Uma mohan
 
howcssworks-100207024009-phpapp01.pptx
howcssworks-100207024009-phpapp01.pptxhowcssworks-100207024009-phpapp01.pptx
howcssworks-100207024009-phpapp01.pptx
RavneetSingh343801
 
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 introduction
Css introductionCss introduction
Css introduction
Sridhar P
 

Similar to Cascading style sheets (CSS) (20)

Css
CssCss
Css
 
Cascading style sheet (css)]
Cascading style sheet (css)]Cascading style sheet (css)]
Cascading style sheet (css)]
 
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
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Css external style sheet
Css external style sheetCss external style sheet
Css external style sheet
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
DW unit 3.pptx
DW unit 3.pptxDW unit 3.pptx
DW unit 3.pptx
 
Castro Chapter 8
Castro Chapter 8Castro Chapter 8
Castro Chapter 8
 
Web programming css
Web programming cssWeb programming css
Web programming css
 
BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptx
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
howcssworks-100207024009-phpapp01.pptx
howcssworks-100207024009-phpapp01.pptxhowcssworks-100207024009-phpapp01.pptx
howcssworks-100207024009-phpapp01.pptx
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
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 introduction
Css introductionCss introduction
Css introduction
 
Unit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptxUnit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptx
 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
 
CSS.ppt
CSS.pptCSS.ppt
CSS.ppt
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
ashishpaul799
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
17thcssbs2
 

Recently uploaded (20)

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon season
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptxREPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 

Cascading style sheets (CSS)

  • 2.  Objective  Introduction to CSS  What is CSS?  CSS Syntax  Types of CSS  External Style Sheet  Internal Style Sheet  Inline Style  Cascade order  Advantages of CSS  Conclusion
  • 3.  “What is CSS?”  Structure of CSS  How to use CSS in your web page
  • 4. • CSS(Cascading Style Sheet) was developed by Hakon Wium Lie in 1996. • HTML was originally designed as a simple way of presenting information intended for sharing scientific documents and research papers online. • To improve web presentation capabilities CSS was introduced by W3C (World Wide Web Consortium). It was intended to allow web designers to define the look and feel of their web pages, and to separate content from document’s layout.
  • 5. • CSS stands for “Cascading Style Sheets.” • Cascading: refers to the procedure that determine which style will apply to a certain section, if you have more than one style rule. • Style: how you want a certain part of your page to look. You can set things like color, margins, font etc for things like tables, paragraphs and headings. • Sheets: the “sheets” are like templates, or a set of rules, for determine how the web page will look. So, CSS(all together) is a styling language-is set of rules to tell browsers how your web page should look.
  • 6. • The selector points to the HTML element you want to style. • The declaration block contain one or more declarations separated by semicolons. • Each declaration includes a CSS property name and a value, separated by colon. •A CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces.
  • 7. There are three types of cascading style sheets: 1. External style sheet 2. Internal style sheet 3. Inline style
  • 8. • Ideal when applied to many pages. • Syntax: <head> <link rel=“stylesheet” type=“text/css” href=“mystyle.css”/> </head> •An external style sheet can be written in any text editor. • Your style sheet should be saved with a .css extension. • Eg. hr{ color : blue; } p{ margin-left : 20px; } body{ background-image : url(“images/back40.gif”); }
  • 9. • It should be used when a single document has a unique style. • You can define internal styles in the head section of an HTML page, by using the <style> tag, like this- • E.g. <head> <style type=“text/css”> hr{ color : blue; } p{ margin-left : 20px; } body{ background-image : url(“images/back40.gif”); } </style> </head>
  • 10. •An Inline style loses many of the advantages of style sheet. • To use inline styles, add the style attribute to the relevant tag. • The style attribute can contain any css property. • E.g. <h1 style=“color : blue; margin-left:20px;”>This is a heading</h1>
  • 11. • What style will be used when there is more than one style specified for an HTML element? •All the style will “Cascade” into a new “virtual” style sheet by the following rules, where number one has the highest priority:  Inline style(inside an HTML element)  External and Internal style sheets(in the head section)
  • 12. •Allows separating content of an HTML document from the style and layout of that document. • Make documents much easier to maintain and give much better control over the layout of your web pages. • CSS saves lots of time • Easy maintenance • Pages load faster • Superior styles to HTML • Multiple device compatibility
  • 13. In this presentation we’ve learned that how to create style sheets to control the style and layout of multiple web sites at once.
  • 14. Submitted to: Sir Vikas Somani