SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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)
 

Ähnlich wie 05. session 05 introducing css

Ähnlich wie 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
 

Mehr von 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 Đỗ
 

Mehr von 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
 

Kürzlich hochgeladen

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

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