SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

What's hot (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
 

Viewers also liked (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)
 

Similar to 05. session 05 introducing css

CSS Cascading Style Sheet Introduction slides
CSS Cascading Style Sheet Introduction slidesCSS Cascading Style Sheet Introduction slides
CSS Cascading Style Sheet Introduction slides
Aasma13
 
Intro webtechstc
Intro webtechstcIntro webtechstc
Intro webtechstc
cmcsubho
 

Similar to 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
 
CSS Cascading Style Sheet Introduction slides
CSS Cascading Style Sheet Introduction slidesCSS Cascading Style Sheet Introduction slides
CSS Cascading Style Sheet Introduction slides
 
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
 

More from Phúc Đỗ

15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data binding
Phúc Đỗ
 
14. session 14 dhtml filter
14. session 14   dhtml filter14. session 14   dhtml filter
14. session 14 dhtml filter
Phúc Đỗ
 
13. session 13 introduction to dhtml
13. session 13   introduction to dhtml13. session 13   introduction to dhtml
13. session 13 introduction to dhtml
Phúc Đỗ
 
12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objects
Phúc Đỗ
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objects
Phúc Đỗ
 
10. session 10 loops and arrays
10. session 10   loops and arrays10. session 10   loops and arrays
10. session 10 loops and arrays
Phúc Đỗ
 
09. session 9 operators and statements
09. session 9   operators and statements09. session 9   operators and statements
09. session 9 operators and statements
Phúc Đỗ
 
08. session 08 intoduction to javascript
08. session 08   intoduction to javascript08. session 08   intoduction to javascript
08. session 08 intoduction to javascript
Phúc Đỗ
 
07. session 07 adv css properties
07. session 07   adv css properties07. session 07   adv css properties
07. session 07 adv css properties
Phúc Đỗ
 
06. session 06 css color_andlayoutpropeties
06. session 06   css color_andlayoutpropeties06. session 06   css color_andlayoutpropeties
06. session 06 css color_andlayoutpropeties
Phúc Đỗ
 
04. session 04 working withformsandframes
04. session 04   working withformsandframes04. session 04   working withformsandframes
04. session 04 working withformsandframes
Phú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 tables
Phú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 elements
Phúc Đỗ
 
15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data binding
Phúc Đỗ
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to html
Phúc Đỗ
 

More from 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
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
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
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 

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