SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente (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
 

Destacado

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
 

Destacado (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 a 05. session 05 introducing css

Similar a 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
 

Más 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 Đỗ
 

Más 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
 

Último

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Último (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

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