SlideShare a Scribd company logo
By: Vijayta Vinayak Solutions
CSS Introduction C ascading  S tyle  S heet is  a feature being added to HTML that gives both Web site developers and users more control over how pages are displayed. With CSS, designers and users can create style sheets that define how different elements, such as headers and links, appear. These style sheets can then be applied to any Web page.  The term  cascading  derives from the fact that multiple style sheets can be applied to the same Web page. Vinayak Solutions
Use of Style Sheets separate structure from appearance create consistent appearance ease of maintenance increase accessibility  apply additional effects  reduce use of non-standard tags reduce web page file size Vinayak Solutions
Consistent Appearance & Ease of Maintenance Create one style sheet Use link tag to use  for several web pages Make changes in one file Vinayak Solutions
Consistent Appearance & Ease of Maintenance Create one style sheet Use link tag to use  for several web pages Make changes in one file Vinayak Solutions
Increase Accessibility User can override your style sheet You can create different style sheets for alternative devices Vinayak Solutions
Apply Additional Effects Add hover effect to links Remove underlines on links Add horizontal rule to headings Use instead of a table for a border Control paragraph, line, letter spacing Use instead of tables for layout Vinayak Solutions
Additional effects h1 { font-size: 2em; vertical-align: text-bottom;    line-height: 1.25em; margin-right: 5%;    font-family: "Arial Black", Verdana, sans-serif;   letter-spacing: 0.5em;    color: blue; background-color: silver} h2 { border-style: solid none none none;   border-width: medium; border-color: #808080;   margin-top: 1.5em; margin-bottom: .5em;   font-size: 1.75em; text-transform: capitalize; } ul { margin-top: .1em; list-style: square} li { margin-bottom: .25em;} a {  text-decoration: none; } a:hover { text-decoration: underline;    color: #800000; background-color: #ffcc00;} Vinayak Solutions
Replace Non-standard Tags Some tags and attributes have been  deprecated  in HTML 4.0 Strict <font face=arial color=red size=+2> <basefont …> <center> <h1 align=center> <td valign=top height=45 > <ul type=square> Vinayak Solutions
Reduce Web Page File Size Every keystroke counts! Smaller files load more quickly Save disk space Vinayak Solutions
Keep it in mind when using CSS Older browsers either dont understand it, or understand it badly (incompatibilities) In some instances current browsers sometimes interpret the style differently thus resulting in different results. Vinayak Solutions
Type of CSS Inline stylesheet <H1 style= &quot; color: maroon &quot; > Embedded stylesheet <style>  </style> External stylesheet <link  href=&quot;style.css &quot; > Vinayak Solutions
Inline Stylesheet <H1 style= &quot; color: maroon &quot; > Similar to adding attributes to html tags Disadvantages decreased accessibility increased file size harder to update Vinayak Solutions
Embedded style sheets <style>  <!-- h1 {font-family: arial, sans-serif;}  -->  </style> Put rules between style tags Put in head section Add html comment tags Use when single document has unique style  Vinayak Solutions
External style sheets <link rel=&quot;stylesheet&quot;   type=&quot;text/css&quot;  href= &quot; style.css&quot; > Save rules in external file Advantages ease of maintenance use less disk space  increase accessibility Vinayak Solutions
Rules A Cascading Style Sheets rule is made up of a selector and a declaration. H2 {color: blue;}  selector {declaration;} Vinayak Solutions
Declaration The declaration is the part of the rule inside the curly braces. It specifies what a style effect will be.  For example, &quot;color: blue&quot;. Vinayak Solutions
CSS selectors Selectors are one of the most important aspects of CSS as they are used to &quot;select&quot; elements on an HTML page so that they can be styled. Type selectors Class selectors ID selectors Vinayak Solutions
Type  selectors The most common and easy to understand selectors are type selectors. Type selectors will select any HTML element on a page that matches the selector, regardless of their position in the document tree. For example: h1 {color: blue; font-size:16;} p  {color: green; font-size:12;} Vinayak Solutions
Class  selectors While type selectors target  every  instance of an element, class selectors can be used to select any HTML element that has a class attribute, regardless of their position in the document tree.  For example, if you want to target the first paragraph and first list items on a page to make them stand out, you could mark up the page in the following way:   Vinayak Solutions
<body> <p class=&quot;big&quot;>This is some <em>text</em></p> <p>This is some text</p> <ul> <li class=&quot;big&quot;>List item</li> <li>List item</li> <li>List <em>item</em></li> </ul> </body> Vinayak Solutions
ID  selectors The most common and easy to understand selectors are type selectors. Type selectors will select any HTML element on a page that matches the selector, regardless of their position in the document tree. For example: h1 {color: blue; } p  {font-family-arial; text-  align: justify; } Vinayak Solutions
Browser Support Older (before CSS): NN3, Lynx Broken: IE3, IE4, NN4 Compliant: Mozilla and Netscape 6 Opera 5 and 6 recent versions of Internet Explorer Vinayak Solutions
CSS and Accessibility Use good HTML:  <h1>  instead of  <div style= &quot; font-size: big; font-weight: bold;&quot;> Make sure page is readable  without any style sheet enabled Vinayak Solutions
Vinayak Solutions

More Related Content

PPTX
PPTX
Css Basics
PDF
CSS Lists and Tables
ODP
CSS Basics
PPT
Box Model
PPSX
Introduction to css
PPTX
Links in Html
PPTX
Anchor tag HTML Presentation
Css Basics
CSS Lists and Tables
CSS Basics
Box Model
Introduction to css
Links in Html
Anchor tag HTML Presentation

What's hot (20)

PPTX
PPTX
Images and Tables in HTML
PPT
ODP
Introduction to css & its attributes with syntax
PDF
Intro to HTML and CSS basics
PPTX
Form using html and java script validation
PPT
HTML Tables.ppt
PPT
vb.net Constructor and destructor
PPTX
Cascading style sheets (CSS-Web Technology)
PPTX
How to learn HTML in 10 Days
PPT
C# Basics
PPTX
html-table
PPTX
Java script
PPTX
Elements of html powerpoint
PPTX
PPTX
Css backgrounds
PPT
Basic html
PPTX
presentation in html,css,javascript
PPTX
Images and Tables in HTML
Introduction to css & its attributes with syntax
Intro to HTML and CSS basics
Form using html and java script validation
HTML Tables.ppt
vb.net Constructor and destructor
Cascading style sheets (CSS-Web Technology)
How to learn HTML in 10 Days
C# Basics
html-table
Java script
Elements of html powerpoint
Css backgrounds
Basic html
presentation in html,css,javascript
Ad

Viewers also liked (19)

PPTX
Cascading style sheet
PPTX
Cascading Style Sheet (CSS)
ODP
PPTX
Week 12 CSS - Review from last week
PPTX
Css ppt
PPT
Html & Css presentation
PPTX
Web Engineering - Basic CSS Properties
ODP
Cascading Style Sheets - Part 01
PPT
Scripting languages
PPT
Common gateway interface
PPTX
Scripting languages
PPT
Common Gateway Interface
PPT
Css Ppt
PPT
Introduction to Cascading Style Sheets (CSS)
PPT
CGI Presentation
PDF
HTML CSS Basics
PDF
HTML/CSS/JS基础
PPT
Html JavaScript and CSS
Cascading style sheet
Cascading Style Sheet (CSS)
Week 12 CSS - Review from last week
Css ppt
Html & Css presentation
Web Engineering - Basic CSS Properties
Cascading Style Sheets - Part 01
Scripting languages
Common gateway interface
Scripting languages
Common Gateway Interface
Css Ppt
Introduction to Cascading Style Sheets (CSS)
CGI Presentation
HTML CSS Basics
HTML/CSS/JS基础
Html JavaScript and CSS
Ad

Similar to Cascading Style Sheet (20)

PPTX
Cascading style-sheet-
PPT
Basics Of Css And Some Common Mistakes
PPT
Css 2010
PPT
Css 2010
PPT
cascading style sheet ppt
PPS
PPT
Html Expression Web
PPT
IP - Lecture 6, 7 Chapter-3 (3).ppt
PPT
Advance Css
PPT
Advance Css 1194323118268797 5
PPT
Introduction to css by programmerblog.net
PDF
TUTORIAL DE CSS 2.0
PPT
Chapter 4a cascade style sheet css
PDF
Introduction to HTML and CSS
PPT
XHTML and CSS
PPTX
cascadingstylesheets,introduction.css styles-210909054722.pptx
PPT
SDP_-_Module_4.ppt
PPTX
1 03 - CSS Introduction
Cascading style-sheet-
Basics Of Css And Some Common Mistakes
Css 2010
Css 2010
cascading style sheet ppt
Html Expression Web
IP - Lecture 6, 7 Chapter-3 (3).ppt
Advance Css
Advance Css 1194323118268797 5
Introduction to css by programmerblog.net
TUTORIAL DE CSS 2.0
Chapter 4a cascade style sheet css
Introduction to HTML and CSS
XHTML and CSS
cascadingstylesheets,introduction.css styles-210909054722.pptx
SDP_-_Module_4.ppt
1 03 - CSS Introduction

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Modernizing your data center with Dell and AMD
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Approach and Philosophy of On baking technology
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
Teaching material agriculture food technology
Cloud computing and distributed systems.
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
Review of recent advances in non-invasive hemoglobin estimation
Modernizing your data center with Dell and AMD
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Approach and Philosophy of On baking technology
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MYSQL Presentation for SQL database connectivity
NewMind AI Monthly Chronicles - July 2025
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf

Cascading Style Sheet

  • 2. CSS Introduction C ascading S tyle S heet is a feature being added to HTML that gives both Web site developers and users more control over how pages are displayed. With CSS, designers and users can create style sheets that define how different elements, such as headers and links, appear. These style sheets can then be applied to any Web page. The term cascading derives from the fact that multiple style sheets can be applied to the same Web page. Vinayak Solutions
  • 3. Use of Style Sheets separate structure from appearance create consistent appearance ease of maintenance increase accessibility apply additional effects reduce use of non-standard tags reduce web page file size Vinayak Solutions
  • 4. Consistent Appearance & Ease of Maintenance Create one style sheet Use link tag to use for several web pages Make changes in one file Vinayak Solutions
  • 5. Consistent Appearance & Ease of Maintenance Create one style sheet Use link tag to use for several web pages Make changes in one file Vinayak Solutions
  • 6. Increase Accessibility User can override your style sheet You can create different style sheets for alternative devices Vinayak Solutions
  • 7. Apply Additional Effects Add hover effect to links Remove underlines on links Add horizontal rule to headings Use instead of a table for a border Control paragraph, line, letter spacing Use instead of tables for layout Vinayak Solutions
  • 8. Additional effects h1 { font-size: 2em; vertical-align: text-bottom; line-height: 1.25em; margin-right: 5%; font-family: &quot;Arial Black&quot;, Verdana, sans-serif; letter-spacing: 0.5em; color: blue; background-color: silver} h2 { border-style: solid none none none; border-width: medium; border-color: #808080; margin-top: 1.5em; margin-bottom: .5em; font-size: 1.75em; text-transform: capitalize; } ul { margin-top: .1em; list-style: square} li { margin-bottom: .25em;} a { text-decoration: none; } a:hover { text-decoration: underline; color: #800000; background-color: #ffcc00;} Vinayak Solutions
  • 9. Replace Non-standard Tags Some tags and attributes have been deprecated in HTML 4.0 Strict <font face=arial color=red size=+2> <basefont …> <center> <h1 align=center> <td valign=top height=45 > <ul type=square> Vinayak Solutions
  • 10. Reduce Web Page File Size Every keystroke counts! Smaller files load more quickly Save disk space Vinayak Solutions
  • 11. Keep it in mind when using CSS Older browsers either dont understand it, or understand it badly (incompatibilities) In some instances current browsers sometimes interpret the style differently thus resulting in different results. Vinayak Solutions
  • 12. Type of CSS Inline stylesheet <H1 style= &quot; color: maroon &quot; > Embedded stylesheet <style> </style> External stylesheet <link href=&quot;style.css &quot; > Vinayak Solutions
  • 13. Inline Stylesheet <H1 style= &quot; color: maroon &quot; > Similar to adding attributes to html tags Disadvantages decreased accessibility increased file size harder to update Vinayak Solutions
  • 14. Embedded style sheets <style> <!-- h1 {font-family: arial, sans-serif;} --> </style> Put rules between style tags Put in head section Add html comment tags Use when single document has unique style Vinayak Solutions
  • 15. External style sheets <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href= &quot; style.css&quot; > Save rules in external file Advantages ease of maintenance use less disk space increase accessibility Vinayak Solutions
  • 16. Rules A Cascading Style Sheets rule is made up of a selector and a declaration. H2 {color: blue;} selector {declaration;} Vinayak Solutions
  • 17. Declaration The declaration is the part of the rule inside the curly braces. It specifies what a style effect will be. For example, &quot;color: blue&quot;. Vinayak Solutions
  • 18. CSS selectors Selectors are one of the most important aspects of CSS as they are used to &quot;select&quot; elements on an HTML page so that they can be styled. Type selectors Class selectors ID selectors Vinayak Solutions
  • 19. Type selectors The most common and easy to understand selectors are type selectors. Type selectors will select any HTML element on a page that matches the selector, regardless of their position in the document tree. For example: h1 {color: blue; font-size:16;} p {color: green; font-size:12;} Vinayak Solutions
  • 20. Class selectors While type selectors target every instance of an element, class selectors can be used to select any HTML element that has a class attribute, regardless of their position in the document tree. For example, if you want to target the first paragraph and first list items on a page to make them stand out, you could mark up the page in the following way: Vinayak Solutions
  • 21. <body> <p class=&quot;big&quot;>This is some <em>text</em></p> <p>This is some text</p> <ul> <li class=&quot;big&quot;>List item</li> <li>List item</li> <li>List <em>item</em></li> </ul> </body> Vinayak Solutions
  • 22. ID selectors The most common and easy to understand selectors are type selectors. Type selectors will select any HTML element on a page that matches the selector, regardless of their position in the document tree. For example: h1 {color: blue; } p {font-family-arial; text- align: justify; } Vinayak Solutions
  • 23. Browser Support Older (before CSS): NN3, Lynx Broken: IE3, IE4, NN4 Compliant: Mozilla and Netscape 6 Opera 5 and 6 recent versions of Internet Explorer Vinayak Solutions
  • 24. CSS and Accessibility Use good HTML: <h1> instead of <div style= &quot; font-size: big; font-weight: bold;&quot;> Make sure page is readable without any style sheet enabled Vinayak Solutions