SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Teaching Presentation

                CSS-Lesson: I
            Topic: Cascading Style
              Sheet (CSS) Basics
                           By Jakia Salam




12/9/2011
Lesson Objectives:
     ď‚— Introduction to CSS

     ď‚— Define a style rule or syntax

     ď‚— The id and class Selectors

     ď‚— Applying a style sheet to a Web Page

     ď‚— Questions and Answers




12/9/2011
Introducing CSS
     ď‚— CSS stands for Cascading Style Sheet. Web developers
       define the look and feel of their Web pages using CSS

     ď‚— It allows developers and designers to separate content
       from design. CSS can be applied to any HTML and XHTML
       file to render HTML or XHTML document using a Browser

     ď‚— CSS provides consistent look and feel to an entire website
       through precise control of web page elements

     ď‚— Versions include CSS1, CSS2, CSS2.1 and CSS3 (current
       version)

     ď‚— Compatibility issues with different versions of CSS and
       browsers need to be considered as part of web site design

12/9/2011
Introducing CSS




12/9/2011
Define style rule
     ď‚— Basic syntax for CSS style is:
        Selector { Property 1: value1; Property 2: value2; Property 3:
          value 3;……}

     ď‚— The selector is normally the HTML element you want to
       style

     ď‚— Each declaration consists of a property and a value




12/9/2011
The id selector
     ď‚— The id selector is used to specify a style for a single,
       unique element.

     ď‚— The id selector uses the id attribute of the HTML
       element, and is defined with a “#”.

     ď‚— The style rule below will be applied to the element with
       id=“header”:




     Result:


12/9/2011
The class selector
     ď‚— The class selector is used to specify a style for a group
       of elements. Unlike the id selector, the class selector is
       most often used on several elements

     ď‚— The class selector uses the HTML class attribute, and is
       defined with a “.” The style rule below will be applied
       to the element with class=“imageright”


                          Result




12/9/2011
Cascade in Cascading Style Sheet
     ď‚— An webpage is a combination of several style sheets:




12/9/2011
Three Ways to Insert CSS

     ď‚— External style sheet
     ď‚— Internal style sheet
     ď‚— Inline style




12/9/2011
External Style Sheets
     ď‚— External style sheet is a separate document with a .css
       extension.

     ď‚— Linking an external style sheet <link> or @import:




12/9/2011
Why external CSS is always a
     better choice?

     ď‚— It keeps your website design and content separate. It is
       much easier to reuse your CSS code if you have it in a
       separate file

     ď‚— You can make any changes to your web pages with just a
       few changes in a single CSS file

     ď‚— Clean code that is easy to understand




12/9/2011
Embedded Style Sheets
     ď‚— Embedded Styles are directly inserted within the head
       element of an HTML document using <style> tag.

     <style type=“text/css”> style rules </style>

     ď‚— Example:            Code for Embedded Style




12/9/2011
Inline Style Sheets
     ď‚— Styles are directly applied to specific elements using style
       attribute.

     <element style=“style rules”>…………</element>

     ď‚— Example:
                             Inline Style




     ď‚— Very clear exactly what page element is being formatted

     ď‚— Not recommend in most cases.

12/9/2011
CSS Demo
     ď‚— http://www.w3schools.com/css/demo_default.htm




12/9/2011
Some of my sample web designs using CSS




12/9/2011
Cascading Style Sheet Resources:
     ď‚— W3 School

     ď‚— CSS Beginner Tutorial

     ď‚— Web Style Sheets CSS tips & tricks

     ď‚— Zen Garden




12/9/2011
Thank You



12/9/2011
Any Questions?



12/9/2011
Website:
     ď‚— jakiasalam.com

     ď‚— NCDLA 2009 Distance Learning Awards




12/9/2011
Website with and without CSS


     ď‚— http://www.jakiasalam.com/portfolio/websites/links.p
       hp

     ď‚— http://www.jakiasalam.com/portfolio/websites/linkste
       st.php




12/9/2011
User defined
     ď‚— Almost all browsers allow users to modify the default
       setting of the internal style sheet.

     ď‚— Example: using user defined CSS in safari browser




12/9/2011

Weitere ähnliche Inhalte

Was ist angesagt?

CSS LAY OUT
CSS LAY OUTCSS LAY OUT
CSS LAY OUT
kylleses
 
Introduction css
Introduction cssIntroduction css
Introduction css
sagaroceanic11
 
How to get better looking search results in SharePoint with Display Templates
How to get better looking search results in SharePoint with Display TemplatesHow to get better looking search results in SharePoint with Display Templates
How to get better looking search results in SharePoint with Display Templates
KieferConsulting
 

Was ist angesagt? (20)

Html n CSS
Html n CSSHtml n CSS
Html n CSS
 
Website design 2
Website design 2Website design 2
Website design 2
 
CSS 3, Style and Beyond
CSS 3, Style and BeyondCSS 3, Style and Beyond
CSS 3, Style and Beyond
 
Welcome to css!
Welcome to css!Welcome to css!
Welcome to css!
 
CSS LAY OUT
CSS LAY OUTCSS LAY OUT
CSS LAY OUT
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSS
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Introduction to the Web and HTML
Introduction to the Web and HTMLIntroduction to the Web and HTML
Introduction to the Web and HTML
 
Introduction to CSS Class - 1
Introduction to CSS Class - 1Introduction to CSS Class - 1
Introduction to CSS Class - 1
 
Css
CssCss
Css
 
Introduction css
Introduction cssIntroduction css
Introduction css
 
Css
CssCss
Css
 
Introduction of css
Introduction of cssIntroduction of css
Introduction of css
 
CSS introduction
CSS introductionCSS introduction
CSS introduction
 
How to get better looking search results in SharePoint with Display Templates
How to get better looking search results in SharePoint with Display TemplatesHow to get better looking search results in SharePoint with Display Templates
How to get better looking search results in SharePoint with Display Templates
 
INFT132 093 05 Cascading Style Sheets
INFT132 093 05 Cascading Style SheetsINFT132 093 05 Cascading Style Sheets
INFT132 093 05 Cascading Style Sheets
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Wordpress child-theme
Wordpress child-themeWordpress child-theme
Wordpress child-theme
 
Getting Started with WordPress Child Theme
Getting Started with WordPress  Child ThemeGetting Started with WordPress  Child Theme
Getting Started with WordPress Child Theme
 
Css inclusion
Css   inclusionCss   inclusion
Css inclusion
 

Andere mochten auch (9)

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
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
CSS ppt
CSS pptCSS ppt
CSS ppt
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 

Ă„hnlich wie Teaching presentation

Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
This is css which compiled by alex that is impo
This is css which compiled by alex that is impoThis is css which compiled by alex that is impo
This is css which compiled by alex that is impo
AlebelAyalneh
 
Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10
Sutinder Mann
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
GmachImen
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
Joseph Gabriel
 
Using Cascading Style Sheets2
Using Cascading Style Sheets2Using Cascading Style Sheets2
Using Cascading Style Sheets2
Sutinder Mann
 

Ă„hnlich wie Teaching presentation (20)

The CSS Handbook
The CSS HandbookThe CSS Handbook
The CSS Handbook
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdf
 
CSS.ppt
CSS.pptCSS.ppt
CSS.ppt
 
Vskills certified css designer Notes
Vskills certified css designer NotesVskills certified css designer Notes
Vskills certified css designer Notes
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
 
New Css style
New Css styleNew Css style
New Css style
 
This is css which compiled by alex that is impo
This is css which compiled by alex that is impoThis is css which compiled by alex that is impo
This is css which compiled by alex that is impo
 
Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
Style and Selector
Style and SelectorStyle and Selector
Style and Selector
 
Css class-01
Css class-01Css class-01
Css class-01
 
Rational HATS and CSS
Rational HATS and CSSRational HATS and CSS
Rational HATS and CSS
 
Shyam sunder Rajasthan Computer
Shyam sunder Rajasthan ComputerShyam sunder Rajasthan Computer
Shyam sunder Rajasthan Computer
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Full
FullFull
Full
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType Classification
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Using Cascading Style Sheets2
Using Cascading Style Sheets2Using Cascading Style Sheets2
Using Cascading Style Sheets2
 

KĂĽrzlich hochgeladen

KĂĽrzlich hochgeladen (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Teaching presentation

  • 1. Teaching Presentation CSS-Lesson: I Topic: Cascading Style Sheet (CSS) Basics By Jakia Salam 12/9/2011
  • 2. Lesson Objectives: ď‚— Introduction to CSS ď‚— Define a style rule or syntax ď‚— The id and class Selectors ď‚— Applying a style sheet to a Web Page ď‚— Questions and Answers 12/9/2011
  • 3. Introducing CSS ď‚— CSS stands for Cascading Style Sheet. Web developers define the look and feel of their Web pages using CSS ď‚— It allows developers and designers to separate content from design. CSS can be applied to any HTML and XHTML file to render HTML or XHTML document using a Browser ď‚— CSS provides consistent look and feel to an entire website through precise control of web page elements ď‚— Versions include CSS1, CSS2, CSS2.1 and CSS3 (current version) ď‚— Compatibility issues with different versions of CSS and browsers need to be considered as part of web site design 12/9/2011
  • 5. Define style rule ď‚— Basic syntax for CSS style is: Selector { Property 1: value1; Property 2: value2; Property 3: value 3;……} ď‚— The selector is normally the HTML element you want to style ď‚— Each declaration consists of a property and a value 12/9/2011
  • 6. The id selector ď‚— The id selector is used to specify a style for a single, unique element. ď‚— The id selector uses the id attribute of the HTML element, and is defined with a “#”. ď‚— The style rule below will be applied to the element with id=“header”: Result: 12/9/2011
  • 7. The class selector ď‚— The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements ď‚— The class selector uses the HTML class attribute, and is defined with a “.” The style rule below will be applied to the element with class=“imageright” Result 12/9/2011
  • 8. Cascade in Cascading Style Sheet ď‚— An webpage is a combination of several style sheets: 12/9/2011
  • 9. Three Ways to Insert CSS ď‚— External style sheet ď‚— Internal style sheet ď‚— Inline style 12/9/2011
  • 10. External Style Sheets ď‚— External style sheet is a separate document with a .css extension. ď‚— Linking an external style sheet <link> or @import: 12/9/2011
  • 11. Why external CSS is always a better choice? ď‚— It keeps your website design and content separate. It is much easier to reuse your CSS code if you have it in a separate file ď‚— You can make any changes to your web pages with just a few changes in a single CSS file ď‚— Clean code that is easy to understand 12/9/2011
  • 12. Embedded Style Sheets ď‚— Embedded Styles are directly inserted within the head element of an HTML document using <style> tag. <style type=“text/css”> style rules </style> ď‚— Example: Code for Embedded Style 12/9/2011
  • 13. Inline Style Sheets ď‚— Styles are directly applied to specific elements using style attribute. <element style=“style rules”>…………</element> ď‚— Example: Inline Style ď‚— Very clear exactly what page element is being formatted ď‚— Not recommend in most cases. 12/9/2011
  • 14. CSS Demo ď‚— http://www.w3schools.com/css/demo_default.htm 12/9/2011
  • 15. Some of my sample web designs using CSS 12/9/2011
  • 16. Cascading Style Sheet Resources: ď‚— W3 School ď‚— CSS Beginner Tutorial ď‚— Web Style Sheets CSS tips & tricks ď‚— Zen Garden 12/9/2011
  • 19. Website: ď‚— jakiasalam.com ď‚— NCDLA 2009 Distance Learning Awards 12/9/2011
  • 20. Website with and without CSS ď‚— http://www.jakiasalam.com/portfolio/websites/links.p hp ď‚— http://www.jakiasalam.com/portfolio/websites/linkste st.php 12/9/2011
  • 21. User defined ď‚— Almost all browsers allow users to modify the default setting of the internal style sheet. ď‚— Example: using user defined CSS in safari browser 12/9/2011