SlideShare une entreprise Scribd logo
1  sur  23
INTRODUCTION TO CASCADING
  Introduction to cascading
      style sheetsSHEETS

        Session 5
Module Introduction
   Style Sheets
   Style Sheets Elements
   Text and Font Properties
Style Sheets
   Explain Cascading Style Sheet
   Describe the CSS design goal
   Explain the working of CSS
Cascading Style Sheet
   A style sheet is a collection of rules
    that specifies the appearance of
    data in an HTML document.
   Style sheet overcome some
    properties of html element by
    specifying the formatting
    instructions in the separate file.
   A Cascading Style Sheet (CSS) is a
    rule-based language, which
    specifies the formatting instructions
    for the content specified in an
    HTML page.
Cascading Style Sheet
   Benefit:
       Code reusability.
       Less HTML code.
       Device
        independence.
Cascading Style Sheet
<html>
<head>
  <title>Introduction to CSS</title>
  <style type="text/css" media="screen">
   body {
          font-family: Verdana;
          font-size: 16px;
   }
   p{
          font-style:italic;
   }
  </style>
</head>
<body>
   <H3>Title</H3>
   <p>This is my first web page that uses CSS.</p>
</body>
</html>
CSS design goal
   The latest version of CSS        More design goal:
    in use is CSS2. These                Network
    goals are:                            performance
       Compatibility                    Flexibility
       Complementary to html            Richness
       Independent Functioning          Alternative language
       Maintainability                   bindings
       Simplify                         Accessibility.
Working of CSS

   You can embed the CSS code
    within the HTML code or link
    the HTML file to the CSS file.
Style Sheets Elements
   Multiple Properties and Selector
Style Sheets Elements
   Length measurement units: Relative
Style Sheets Elements
   Length measurement units: Absolute
Style Sheets Elements
   Type of style sheets:
       Inline style
       Internal style sheets
       External style sheets
Style Sheets Elements
<html>
<head>
    <title>Introduction to CSS</title>
    <link rel="stylesheet" type="text/css" href="myCSS.css"/>
  <style type="text/css" media="screen">
    p{
            font-style:italic;
    }
  </style>
</head>
<body>
    <H3>Title</H3>
    <h2 style="color:red; font-family:'Courier New';">
            This is sub title</h2>
    <p>This is my first web page that uses CSS.</p>
</body>
</html>
Style Sheets Elements: Selector
   CSS provides four different types of selectors:
       Type selector
       Class selectors
       ID selectors
       Universal selector
Style Sheets Elements: Selector
Style Sheets Elements: Selector
   Generic cascading order
Text and Font Properties
   Explain the text properties.
   Explain the font properties.
Text Properties
Property          Description                 Value
color             Specifies the color of text. red, green, #FFAA00, …
text-align        Specifies the alignment     left, right, center, justify.
                  of text in an element.
text-decoration   Specifies the alignment     none, underline, overline,
                  of text in an element.      line-through.
text-indent       Specifies the indentation   length, %.
                  of first line of text.
text-transform    Specifies the casing of     none, capitalize, uppercase,
                  text.                       lowercase.
word-spacing      sets the word spacing for   normal, length.
                  text content
Text Properties
                                              div {    color: blue;
                                                       text-align: left;
<html>                                                 text-indent: 2em;
<head>                                                 word-spacing: 2mm;
<title>Introduction to CSS</title>            }
     <link rel="stylesheet" type="text/css"   .old {   color: gray;
     href="myCSS2.css">                                text-decoration: line-through;
                                              }
</head>

<body>
<div>
<h2>Notices</h2>
<p class="old">Old campus: Melbourne
    city.</p>
<p>New campus: Sai gon, Vietname</p>
</div>
</body>
</html>
Font Properties
Property       Description                   Value
font-family    Specifies the font.           Arial, Helvetica, sans-
                                             serif,…
font-size      Specifies the size of font.   medium, xx-small, 12px, x-
                                             large,…
font-style     Specifies the size of font.   italic, oblique, normal,
                                             inherit
font-variant   Specifies the size of font.   inherit, normal, small-caps
Text Properties
              UL{           font-family: "Times New Roman";
                            font-size: large;
                            font-style: italic;
                            font-variant: small-caps;
              }
              #shorthand{
                            font:bold 12px Arial;
                            color:red;
              }

<html>
<head>
<title>Introduction to CSS</title>
      <link rel="stylesheet" type="text/css"
      href="myCSS3.css">
</head>
<body>
      <div>
      <h2>Cities in USA</h2>
      <ul>
                <li>Atlanta</li>
                <li>Seatle</li>
                <li id="shorthand">Washington DC</li>
                <li>California</li>
      </ul>
</body>
</html>
Summary
   A style sheet is a collection of rules that specifies
    the appearance of data in an HTML document.
   A Cascading Style Sheet (CSS) is a rule-based
    language, which specifies the formatting
    instructions for the content specified in an HTML
    page.
   You can embed the CSS code within the HTML
    code or link the HTML file to the CSS file.


                                  Building Dynamic Websites/Session 1/ 22 of 16
Summary …
   There are three types style sheets: inline,
    internal and external.
   Can apply style from multiple style sheets to
    HTML elements
   The Text properties specify and control the
    appearance of the text in the Web page.
   The Font properties allow to specify the font
    for the text.

                              Building Dynamic Websites/Session 1/ 23 of 16

Contenu connexe

Tendances (20)

Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Cascstylesheets
CascstylesheetsCascstylesheets
Cascstylesheets
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Css
CssCss
Css
 
Css
CssCss
Css
 
CSS
CSS CSS
CSS
 
03html Css
03html Css03html Css
03html Css
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Full
FullFull
Full
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)
 
Webpage style with CSS
Webpage style with CSSWebpage style with CSS
Webpage style with CSS
 
Css ppt
Css pptCss ppt
Css ppt
 
Css ms megha
Css ms meghaCss ms megha
Css ms megha
 

En vedette

Introduction to Cascading Style Sheets
Introduction to Cascading Style SheetsIntroduction to Cascading Style Sheets
Introduction to Cascading Style SheetsTushar Joshi
 
INTERCAMBIO FUENLABRADA-VALENÇAY
INTERCAMBIO FUENLABRADA-VALENÇAYINTERCAMBIO FUENLABRADA-VALENÇAY
INTERCAMBIO FUENLABRADA-VALENÇAYCarolina Salgado
 
Advance Css
Advance CssAdvance Css
Advance Cssvijayta
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Hatem Mahmoud
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Chris Poteet
 

En vedette (7)

Introduction to Cascading Style Sheets
Introduction to Cascading Style SheetsIntroduction to Cascading Style Sheets
Introduction to Cascading Style Sheets
 
INTERCAMBIO FUENLABRADA-VALENÇAY
INTERCAMBIO FUENLABRADA-VALENÇAYINTERCAMBIO FUENLABRADA-VALENÇAY
INTERCAMBIO FUENLABRADA-VALENÇAY
 
Advance Css
Advance CssAdvance Css
Advance Css
 
Css1
Css1Css1
Css1
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 

Similaire à 05. session 05 introducing css

Similaire à 05. session 05 introducing css (20)

2_css.pptx
2_css.pptx2_css.pptx
2_css.pptx
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptx
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Intro webtechstc
Intro webtechstcIntro webtechstc
Intro webtechstc
 
CSS Presentation Notes.pptx
CSS Presentation Notes.pptxCSS Presentation Notes.pptx
CSS Presentation Notes.pptx
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Content style in html with example - PhpGurukul Tutorials
Content style in html with example - PhpGurukul TutorialsContent style in html with example - PhpGurukul Tutorials
Content style in html with example - PhpGurukul Tutorials
 
CSS Overview
CSS OverviewCSS Overview
CSS Overview
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
 
Workshop 2 Slides.pptx
Workshop 2 Slides.pptxWorkshop 2 Slides.pptx
Workshop 2 Slides.pptx
 
CSS
CSSCSS
CSS
 
What is css
What is cssWhat is css
What is css
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
Css
CssCss
Css
 

Plus de Phúc Đỗ

15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data bindingPhúc Đỗ
 
14. session 14 dhtml filter
14. session 14   dhtml filter14. session 14   dhtml filter
14. session 14 dhtml filterPhúc Đỗ
 
13. session 13 introduction to dhtml
13. session 13   introduction to dhtml13. session 13   introduction to dhtml
13. session 13 introduction to dhtmlPhúc Đỗ
 
12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objectsPhúc Đỗ
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objectsPhúc Đỗ
 
10. session 10 loops and arrays
10. session 10   loops and arrays10. session 10   loops and arrays
10. session 10 loops and arraysPhúc Đỗ
 
09. session 9 operators and statements
09. session 9   operators and statements09. session 9   operators and statements
09. session 9 operators and statementsPhúc Đỗ
 
08. session 08 intoduction to javascript
08. session 08   intoduction to javascript08. session 08   intoduction to javascript
08. session 08 intoduction to javascriptPhúc Đỗ
 
07. session 07 adv css properties
07. session 07   adv css properties07. session 07   adv css properties
07. session 07 adv css propertiesPhúc Đỗ
 
06. session 06 css color_andlayoutpropeties
06. session 06   css color_andlayoutpropeties06. session 06   css color_andlayoutpropeties
06. session 06 css color_andlayoutpropetiesPhúc Đỗ
 
04. session 04 working withformsandframes
04. session 04   working withformsandframes04. session 04   working withformsandframes
04. session 04 working withformsandframesPhúc Đỗ
 
03. session 03 using lists and tables
03. session 03   using lists and tables03. session 03   using lists and tables
03. session 03 using lists and tablesPhúc Đỗ
 
02. session 02 working with html elements
02. session 02   working with html elements02. session 02   working with html elements
02. session 02 working with html elementsPhúc Đỗ
 
15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data bindingPhúc Đỗ
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to htmlPhúc Đỗ
 

Plus de Phúc Đỗ (15)

15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data binding
 
14. session 14 dhtml filter
14. session 14   dhtml filter14. session 14   dhtml filter
14. session 14 dhtml filter
 
13. session 13 introduction to dhtml
13. session 13   introduction to dhtml13. session 13   introduction to dhtml
13. session 13 introduction to dhtml
 
12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objects
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objects
 
10. session 10 loops and arrays
10. session 10   loops and arrays10. session 10   loops and arrays
10. session 10 loops and arrays
 
09. session 9 operators and statements
09. session 9   operators and statements09. session 9   operators and statements
09. session 9 operators and statements
 
08. session 08 intoduction to javascript
08. session 08   intoduction to javascript08. session 08   intoduction to javascript
08. session 08 intoduction to javascript
 
07. session 07 adv css properties
07. session 07   adv css properties07. session 07   adv css properties
07. session 07 adv css properties
 
06. session 06 css color_andlayoutpropeties
06. session 06   css color_andlayoutpropeties06. session 06   css color_andlayoutpropeties
06. session 06 css color_andlayoutpropeties
 
04. session 04 working withformsandframes
04. session 04   working withformsandframes04. session 04   working withformsandframes
04. session 04 working withformsandframes
 
03. session 03 using lists and tables
03. session 03   using lists and tables03. session 03   using lists and tables
03. session 03 using lists and tables
 
02. session 02 working with html elements
02. session 02   working with html elements02. session 02   working with html elements
02. session 02 working with html elements
 
15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data binding
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to html
 

Dernier

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Dernier (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

05. session 05 introducing css

  • 1. INTRODUCTION TO CASCADING Introduction to cascading style sheetsSHEETS Session 5
  • 2. Module Introduction  Style Sheets  Style Sheets Elements  Text and Font Properties
  • 3. Style Sheets  Explain Cascading Style Sheet  Describe the CSS design goal  Explain the working of CSS
  • 4. Cascading Style Sheet  A style sheet is a collection of rules that specifies the appearance of data in an HTML document.  Style sheet overcome some properties of html element by specifying the formatting instructions in the separate file.  A Cascading Style Sheet (CSS) is a rule-based language, which specifies the formatting instructions for the content specified in an HTML page.
  • 5. Cascading Style Sheet  Benefit:  Code reusability.  Less HTML code.  Device independence.
  • 6. Cascading Style Sheet <html> <head> <title>Introduction to CSS</title> <style type="text/css" media="screen"> body { font-family: Verdana; font-size: 16px; } p{ font-style:italic; } </style> </head> <body> <H3>Title</H3> <p>This is my first web page that uses CSS.</p> </body> </html>
  • 7. CSS design goal  The latest version of CSS  More design goal: in use is CSS2. These  Network goals are: performance  Compatibility  Flexibility  Complementary to html  Richness  Independent Functioning  Alternative language  Maintainability bindings  Simplify  Accessibility.
  • 8. Working of CSS  You can embed the CSS code within the HTML code or link the HTML file to the CSS file.
  • 9. Style Sheets Elements  Multiple Properties and Selector
  • 10. Style Sheets Elements  Length measurement units: Relative
  • 11. Style Sheets Elements  Length measurement units: Absolute
  • 12. Style Sheets Elements  Type of style sheets:  Inline style  Internal style sheets  External style sheets
  • 13. Style Sheets Elements <html> <head> <title>Introduction to CSS</title> <link rel="stylesheet" type="text/css" href="myCSS.css"/> <style type="text/css" media="screen"> p{ font-style:italic; } </style> </head> <body> <H3>Title</H3> <h2 style="color:red; font-family:'Courier New';"> This is sub title</h2> <p>This is my first web page that uses CSS.</p> </body> </html>
  • 14. Style Sheets Elements: Selector  CSS provides four different types of selectors:  Type selector  Class selectors  ID selectors  Universal selector
  • 16. Style Sheets Elements: Selector  Generic cascading order
  • 17. Text and Font Properties  Explain the text properties.  Explain the font properties.
  • 18. Text Properties Property Description Value color Specifies the color of text. red, green, #FFAA00, … text-align Specifies the alignment left, right, center, justify. of text in an element. text-decoration Specifies the alignment none, underline, overline, of text in an element. line-through. text-indent Specifies the indentation length, %. of first line of text. text-transform Specifies the casing of none, capitalize, uppercase, text. lowercase. word-spacing sets the word spacing for normal, length. text content
  • 19. Text Properties div { color: blue; text-align: left; <html> text-indent: 2em; <head> word-spacing: 2mm; <title>Introduction to CSS</title> } <link rel="stylesheet" type="text/css" .old { color: gray; href="myCSS2.css"> text-decoration: line-through; } </head> <body> <div> <h2>Notices</h2> <p class="old">Old campus: Melbourne city.</p> <p>New campus: Sai gon, Vietname</p> </div> </body> </html>
  • 20. Font Properties Property Description Value font-family Specifies the font. Arial, Helvetica, sans- serif,… font-size Specifies the size of font. medium, xx-small, 12px, x- large,… font-style Specifies the size of font. italic, oblique, normal, inherit font-variant Specifies the size of font. inherit, normal, small-caps
  • 21. Text Properties UL{ font-family: "Times New Roman"; font-size: large; font-style: italic; font-variant: small-caps; } #shorthand{ font:bold 12px Arial; color:red; } <html> <head> <title>Introduction to CSS</title> <link rel="stylesheet" type="text/css" href="myCSS3.css"> </head> <body> <div> <h2>Cities in USA</h2> <ul> <li>Atlanta</li> <li>Seatle</li> <li id="shorthand">Washington DC</li> <li>California</li> </ul> </body> </html>
  • 22. Summary  A style sheet is a collection of rules that specifies the appearance of data in an HTML document.  A Cascading Style Sheet (CSS) is a rule-based language, which specifies the formatting instructions for the content specified in an HTML page.  You can embed the CSS code within the HTML code or link the HTML file to the CSS file. Building Dynamic Websites/Session 1/ 22 of 16
  • 23. Summary …  There are three types style sheets: inline, internal and external.  Can apply style from multiple style sheets to HTML elements  The Text properties specify and control the appearance of the text in the Web page.  The Font properties allow to specify the font for the text. Building Dynamic Websites/Session 1/ 23 of 16