Cascading style sheets (CSS)

Harshita Yadav
Harshita YadavStudent at Sangam University
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
1 von 14

Recomendados

Introduction to Cascading Style Sheets (CSS) von
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Chris Poteet
11.7K views27 Folien
Complete Lecture on Css presentation von
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation Salman Memon
9.9K views61 Folien
Cascading Style Sheets (CSS) help von
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpcasestudyhelp
1.8K views16 Folien
CSS for Beginners von
CSS for BeginnersCSS for Beginners
CSS for BeginnersAmit Kumar Singh
10.1K views27 Folien
Cascading Style Sheet (CSS) von
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)AakankshaR
14.3K views15 Folien
Css von
CssCss
Cssshanmuga rajan
2.2K views20 Folien

Más contenido relacionado

Was ist angesagt?

(Fast) Introduction to HTML & CSS von
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS Dave Kelly
3.4K views23 Folien
cascading style sheet ppt von
cascading style sheet pptcascading style sheet ppt
cascading style sheet pptabhilashagupta
38.3K views29 Folien
Intro to HTML and CSS basics von
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basicsEliran Eliassy
2.3K views133 Folien
Introduction to CSS von
Introduction to CSSIntroduction to CSS
Introduction to CSSFolasade Adedeji
1K views28 Folien
CSS Basics von
CSS BasicsCSS Basics
CSS BasicsWordPress Memphis
25.1K views40 Folien
Css von
CssCss
CssHemant Saini
2K views15 Folien

Was ist angesagt?(20)

(Fast) Introduction to HTML & CSS von Dave Kelly
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
Dave Kelly3.4K views
cascading style sheet ppt von abhilashagupta
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
abhilashagupta38.3K views
Intro to HTML and CSS basics von Eliran Eliassy
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
Eliran Eliassy2.3K views
Html / CSS Presentation von Shawn Calvert
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert78.9K views
Cascading Style Sheet von vijayta
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
vijayta2.1K views
How Cascading Style Sheets (CSS) Works von Amit Tyagi
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
Amit Tyagi79.4K views
Introduction to CSS von Amit Tyagi
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi45.4K views

Similar a Cascading style sheets (CSS)

Css von
CssCss
Cssveena parihar
110 views26 Folien
Cascading style sheet (css)] von
Cascading style sheet (css)]Cascading style sheet (css)]
Cascading style sheet (css)]9574395990
852 views13 Folien
Cascading style sheets von
Cascading style sheetsCascading style sheets
Cascading style sheetssmithaps4
68 views63 Folien
Css external style sheet von
Css external style sheetCss external style sheet
Css external style sheetJesus Obenita Jr.
409 views4 Folien
Cascading style sheets von
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
88 views62 Folien
DW unit 3.pptx von
DW unit 3.pptxDW unit 3.pptx
DW unit 3.pptxSeethaDinesh
6 views49 Folien

Similar a Cascading style sheets (CSS)(20)

Cascading style sheet (css)] von 9574395990
Cascading style sheet (css)]Cascading style sheet (css)]
Cascading style sheet (css)]
9574395990852 views
Cascading style sheets von smithaps4
Cascading style sheetsCascading style sheets
Cascading style sheets
smithaps468 views
Web programming css von Uma mohan
Web programming cssWeb programming css
Web programming css
Uma mohan58 views
Html Styles-CSS von ispkosova
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
ispkosova59 views
Beginners css tutorial for web designers von Singsys Pte Ltd
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
Singsys Pte Ltd3.2K views
CSS tutorial chapter 1 von jeweltutin
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
jeweltutin211 views
Css introduction von Sridhar P
Css introductionCss introduction
Css introduction
Sridhar P1.7K views
Unit-3-CSS-BWT.pptx von Tanu524249
Unit-3-CSS-BWT.pptxUnit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptx
Tanu52424912 views
Css types internal, external and inline (1) von Webtech Learning
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
Webtech Learning5.5K views

Último

Papal.pdf von
Papal.pdfPapal.pdf
Papal.pdfMariaKenney3
68 views24 Folien
UNIDAD 3 6º C.MEDIO.pptx von
UNIDAD 3 6º C.MEDIO.pptxUNIDAD 3 6º C.MEDIO.pptx
UNIDAD 3 6º C.MEDIO.pptxMarcosRodriguezUcedo
146 views32 Folien
EILO EXCURSION PROGRAMME 2023 von
EILO EXCURSION PROGRAMME 2023EILO EXCURSION PROGRAMME 2023
EILO EXCURSION PROGRAMME 2023info33492
202 views40 Folien
Jibachha publishing Textbook.docx von
Jibachha publishing Textbook.docxJibachha publishing Textbook.docx
Jibachha publishing Textbook.docxDrJibachhaSahVetphys
54 views14 Folien
ICS3211_lecture 09_2023.pdf von
ICS3211_lecture 09_2023.pdfICS3211_lecture 09_2023.pdf
ICS3211_lecture 09_2023.pdfVanessa Camilleri
141 views10 Folien
Parts of Speech (1).pptx von
Parts of Speech (1).pptxParts of Speech (1).pptx
Parts of Speech (1).pptxmhkpreet001
46 views20 Folien

Último(20)

EILO EXCURSION PROGRAMME 2023 von info33492
EILO EXCURSION PROGRAMME 2023EILO EXCURSION PROGRAMME 2023
EILO EXCURSION PROGRAMME 2023
info33492202 views
Parts of Speech (1).pptx von mhkpreet001
Parts of Speech (1).pptxParts of Speech (1).pptx
Parts of Speech (1).pptx
mhkpreet00146 views
Create a Structure in VBNet.pptx von Breach_P
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptx
Breach_P86 views
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv... von Taste
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...
Taste55 views
The Future of Micro-credentials: Is Small Really Beautiful? von Mark Brown
The Future of Micro-credentials:  Is Small Really Beautiful?The Future of Micro-credentials:  Is Small Really Beautiful?
The Future of Micro-credentials: Is Small Really Beautiful?
Mark Brown75 views
Education of marginalized and socially disadvantages segments.pptx von GarimaBhati5
Education of marginalized and socially disadvantages segments.pptxEducation of marginalized and socially disadvantages segments.pptx
Education of marginalized and socially disadvantages segments.pptx
GarimaBhati543 views
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice von Taste
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a ChoiceCreative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice
Taste45 views
Nelson_RecordStore.pdf von BrynNelson5
Nelson_RecordStore.pdfNelson_RecordStore.pdf
Nelson_RecordStore.pdf
BrynNelson546 views
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE... von Nguyen Thanh Tu Collection
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
JQUERY.pdf von ArthyR3
JQUERY.pdfJQUERY.pdf
JQUERY.pdf
ArthyR3105 views
12.5.23 Poverty and Precarity.pptx von mary850239
12.5.23 Poverty and Precarity.pptx12.5.23 Poverty and Precarity.pptx
12.5.23 Poverty and Precarity.pptx
mary850239381 views

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