SlideShare a Scribd company logo
CSS
            CASCADING STYLE SHEETS




TUFTS COMP 20                    CHRIS TRAGANOS
OVERVIEW
        • Intro to CSS
        • Why use it?
        • Terms
        • Examples
        • Questions & Answers

TUFTS COMP 20                   CHRIS TRAGANOS
CSS
          INTRODUCTION
      UNDERSTANDING CASCADING STYLE SHEETS



TUFTS COMP 20                        CHRIS TRAGANOS
Intro to CSS
        • Cascading Style Sheets (CSS) are
           documents that give creative control over
           HTML.

        • They contain a list of styles for specific
           portions of a web page.

        • Typically an external file (.css) that
           controls the presentation.


TUFTS COMP 20                                      CHRIS TRAGANOS
CSS
                WHY USE IT?
          ADVANTAGES TO USING STYLE SHEETS.



TUFTS COMP 20                           CHRIS TRAGANOS
Why CSS?
                     • Separate the
                       STRUCTURE &
                       CONTENT

                     • Control multiple
                       documents with one CSS

                     • Efficiency in load times
                       for websites

                     • Makes document more
                       accessible

TUFTS COMP 20                       CHRIS TRAGANOS
Why CSS?
                     • Separate the
                       STRUCTURE &
                       CONTENT

                     • Control multiple
                       documents with one CSS

                     • Efficiency in load times
                       for websites

                     • Makes document more
                       accessible

TUFTS COMP 20                       CHRIS TRAGANOS
Why CSS?
                               • Separate the
                 6%              STRUCTURE &
           13%
                                 CONTENT

         21%            60%    • Control multiple
                                 documents with one CSS

                               • Efficiency in load times
                                 for websites
          Images
          JavaScript
                        HTML
                        CSS    • Makes document more
                                 accessible

TUFTS COMP 20                                 CHRIS TRAGANOS
Why CSS?
                     • Separate the
                       STRUCTURE &
                       CONTENT

                     • Control multiple
                       documents with one CSS

                     • Efficiency in load times
                       for websites

                     • Makes document more
                       accessible

TUFTS COMP 20                       CHRIS TRAGANOS
CSS
                 TERMS
                THE INNARDS OF CSS



TUFTS COMP 20                        CHRIS TRAGANOS
STYLE
        A rule that describes how to format a
           particular portion of a web page




TUFTS COMP 20                           CHRIS TRAGANOS
STYLE




     p{font‐size:14px;
color:#FF0000;}




TUFTS COMP 20                   CHRIS TRAGANOS
STYLE
Selector

                               Declaration

     p{font‐size:14px;
color:#FF0000;}



            Property: Value;

TUFTS COMP 20                          CHRIS TRAGANOS
the
          BOX MODEL
      Elements in a web page are rectangular
        with many ways of being controlled.




TUFTS COMP 20                          CHRIS TRAGANOS
the   BOX MODEL

                          • Height & Width
                          • Background
                          • Color
                          • Padding
                          • Border
                          • Margin
                          • Position
TUFTS COMP 20                           CHRIS TRAGANOS
the
                 CASCADE
                A sorting method that assigns
                    a weight to each style.




TUFTS COMP 20                               CHRIS TRAGANOS
the   CASCADE
                         p{
                         font‐family:Georgia,
"Times

                         New
Roman",
serif;

                         font‐size:14px;
                         font‐weight:bold;
                         font‐style:
italic;
                         color:#009900;

                         }

                         p{font‐style:normal;

                         color:#990000;}




TUFTS COMP 20                              CHRIS TRAGANOS
CSS
                EXAMPLES
                  TEST DRIVE



TUFTS COMP 20                  CHRIS TRAGANOS
PARAGRAPHS
  The HTML                                   RESULT:
  <p>Hello
World!</p>
                                             Hello World!
  The CSS
  p{
  font‐family:Georgia,
"Times
New
Roman",

  serif;

  font‐size:14px;
  font‐weight:bold;
  font‐style:
italic;
  color:#009900;

  }




TUFTS COMP 20                                          CHRIS TRAGANOS
LISTS
 The HTML                              RESULT:
 <ul>
 

<li>Apples</li>                      • Apples
 

<li>Oranges</li>                     • Oranges
 

<li>Pears</li>
                                        • Pears
 

<li>Plums</li>
 </ul>                                  • Plums


 The CSS
  ul{border‐left:5px
#990000
solid;}

  li{
  color:#333333;
  font‐size:12px;
  line‐height:1.4;
  }


TUFTS COMP 20                                 CHRIS TRAGANOS
DIVs
 The HTML                                        RESULT:
 <div
class=”produce”>
 

<p>Today’s
selection:</p>
 

<ul
id=”fruit”>                             Today’s selection:
 



<li>Apples</li>
 



<li>Oranges</li>                          • Apples
                                               • Oranges
 



<li>Pears</li>
 



<li>Plums</li>
 

</ul>
 </div>                                        • Pears
                                               • Plums
 The CSS
  div.produce{background:#CCCCCC;}
  #fruit{font‐weight:bold;
line‐height:1.8;}




TUFTS COMP 20                                          CHRIS TRAGANOS
#global{}

                    #header
#mast{}

#navbar
ul.site{}

div.outline{}         div.main{}      div.highlights{}
COLOR
                HEX & RGB
                HANDOUT CHEAT SHEET



TUFTS COMP 20                         CHRIS TRAGANOS
COLOR

                          HEX

                  h1{color:#FF0000;}

                          RGB
                h1{color:rgb(255,0,0);}




TUFTS COMP 20                          CHRIS TRAGANOS
RESOURCES
        • Box Model Demo: http://bit.ly/13QxqE
        • CSS REMIX: http://cssremix.com/
        • Opera Web Curriculum: http://bit.ly/tQlV3
        • Intro to CSS 2.1 & CSS 3: http://bit.ly/tnrf4
        • A List Apart: http://www.alistapart.com/


TUFTS COMP 20                                        CHRIS TRAGANOS
THE END
 QUESTIONS?
      twitter: @ctraganos
 chris@arlingtoninteractive.com

More Related Content

Recently uploaded

Research about Venice ppt for grade 6f anas
Research about Venice ppt for grade 6f anasResearch about Venice ppt for grade 6f anas
Research about Venice ppt for grade 6f anas
anasabutalha2013
 
Heuristic Evaluation of System & Application
Heuristic Evaluation of System & ApplicationHeuristic Evaluation of System & Application
Heuristic Evaluation of System & Application
Jaime Brown
 
National-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxNational-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptx
AlecAnidul
 

Recently uploaded (14)

Art Nouveau Movement Presentation for Art History.
Art Nouveau Movement Presentation for Art History.Art Nouveau Movement Presentation for Art History.
Art Nouveau Movement Presentation for Art History.
 
Pitch Presentation for Service Design in Technology
Pitch Presentation for Service Design in TechnologyPitch Presentation for Service Design in Technology
Pitch Presentation for Service Design in Technology
 
Spring 2024 wkrm_Enhancing Campus Mobility.pdf
Spring 2024 wkrm_Enhancing Campus Mobility.pdfSpring 2024 wkrm_Enhancing Campus Mobility.pdf
Spring 2024 wkrm_Enhancing Campus Mobility.pdf
 
BIT- Pinal .H. Prajapati Graphic Designer
BIT- Pinal .H. Prajapati  Graphic DesignerBIT- Pinal .H. Prajapati  Graphic Designer
BIT- Pinal .H. Prajapati Graphic Designer
 
The Evolution of Fashion Trends: History to Fashion
The Evolution of Fashion Trends: History to FashionThe Evolution of Fashion Trends: History to Fashion
The Evolution of Fashion Trends: History to Fashion
 
Research about Venice ppt for grade 6f anas
Research about Venice ppt for grade 6f anasResearch about Venice ppt for grade 6f anas
Research about Venice ppt for grade 6f anas
 
The Design Code Google Developer Student Club.pptx
The Design Code Google Developer Student Club.pptxThe Design Code Google Developer Student Club.pptx
The Design Code Google Developer Student Club.pptx
 
Heuristic Evaluation of System & Application
Heuristic Evaluation of System & ApplicationHeuristic Evaluation of System & Application
Heuristic Evaluation of System & Application
 
CA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdfCA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdf
 
National-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxNational-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptx
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
 
Claire's designing portfolio presentation
Claire's designing portfolio presentationClaire's designing portfolio presentation
Claire's designing portfolio presentation
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
 
Design lessons from Singapore | Volume 3
Design lessons from Singapore | Volume 3Design lessons from Singapore | Volume 3
Design lessons from Singapore | Volume 3
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

CSS: An Introduction

  • 1. CSS CASCADING STYLE SHEETS TUFTS COMP 20 CHRIS TRAGANOS
  • 2. OVERVIEW • Intro to CSS • Why use it? • Terms • Examples • Questions & Answers TUFTS COMP 20 CHRIS TRAGANOS
  • 3. CSS INTRODUCTION UNDERSTANDING CASCADING STYLE SHEETS TUFTS COMP 20 CHRIS TRAGANOS
  • 4. Intro to CSS • Cascading Style Sheets (CSS) are documents that give creative control over HTML. • They contain a list of styles for specific portions of a web page. • Typically an external file (.css) that controls the presentation. TUFTS COMP 20 CHRIS TRAGANOS
  • 5. CSS WHY USE IT? ADVANTAGES TO USING STYLE SHEETS. TUFTS COMP 20 CHRIS TRAGANOS
  • 6. Why CSS? • Separate the STRUCTURE & CONTENT • Control multiple documents with one CSS • Efficiency in load times for websites • Makes document more accessible TUFTS COMP 20 CHRIS TRAGANOS
  • 7. Why CSS? • Separate the STRUCTURE & CONTENT • Control multiple documents with one CSS • Efficiency in load times for websites • Makes document more accessible TUFTS COMP 20 CHRIS TRAGANOS
  • 8. Why CSS? • Separate the 6% STRUCTURE & 13% CONTENT 21% 60% • Control multiple documents with one CSS • Efficiency in load times for websites Images JavaScript HTML CSS • Makes document more accessible TUFTS COMP 20 CHRIS TRAGANOS
  • 9. Why CSS? • Separate the STRUCTURE & CONTENT • Control multiple documents with one CSS • Efficiency in load times for websites • Makes document more accessible TUFTS COMP 20 CHRIS TRAGANOS
  • 10. CSS TERMS THE INNARDS OF CSS TUFTS COMP 20 CHRIS TRAGANOS
  • 11. STYLE A rule that describes how to format a particular portion of a web page TUFTS COMP 20 CHRIS TRAGANOS
  • 12. STYLE p{font‐size:14px;
color:#FF0000;} TUFTS COMP 20 CHRIS TRAGANOS
  • 13. STYLE Selector Declaration p{font‐size:14px;
color:#FF0000;} Property: Value; TUFTS COMP 20 CHRIS TRAGANOS
  • 14. the BOX MODEL Elements in a web page are rectangular with many ways of being controlled. TUFTS COMP 20 CHRIS TRAGANOS
  • 15. the BOX MODEL • Height & Width • Background • Color • Padding • Border • Margin • Position TUFTS COMP 20 CHRIS TRAGANOS
  • 16. the CASCADE A sorting method that assigns a weight to each style. TUFTS COMP 20 CHRIS TRAGANOS
  • 17. the CASCADE p{ font‐family:Georgia,
"Times
 New
Roman",
serif;
 font‐size:14px; font‐weight:bold; font‐style:
italic; color:#009900;
 } p{font‐style:normal;
 color:#990000;} TUFTS COMP 20 CHRIS TRAGANOS
  • 18. CSS EXAMPLES TEST DRIVE TUFTS COMP 20 CHRIS TRAGANOS
  • 19. PARAGRAPHS The HTML RESULT: <p>Hello
World!</p> Hello World! The CSS p{ font‐family:Georgia,
"Times
New
Roman",
 serif;
 font‐size:14px; font‐weight:bold; font‐style:
italic; color:#009900;
 } TUFTS COMP 20 CHRIS TRAGANOS
  • 20. LISTS The HTML RESULT: <ul> 

<li>Apples</li> • Apples 

<li>Oranges</li> • Oranges 

<li>Pears</li> • Pears 

<li>Plums</li> </ul> • Plums The CSS ul{border‐left:5px
#990000
solid;} li{ color:#333333; font‐size:12px; line‐height:1.4; } TUFTS COMP 20 CHRIS TRAGANOS
  • 21. DIVs The HTML RESULT: <div
class=”produce”> 

<p>Today’s
selection:</p> 

<ul
id=”fruit”> Today’s selection: 



<li>Apples</li> 



<li>Oranges</li> • Apples • Oranges 



<li>Pears</li> 



<li>Plums</li> 

</ul> </div> • Pears • Plums The CSS div.produce{background:#CCCCCC;} #fruit{font‐weight:bold;
line‐height:1.8;} TUFTS COMP 20 CHRIS TRAGANOS
  • 22.
  • 23. #global{} #header
#mast{} #navbar
ul.site{} div.outline{} div.main{} div.highlights{}
  • 24. COLOR HEX & RGB HANDOUT CHEAT SHEET TUFTS COMP 20 CHRIS TRAGANOS
  • 25. COLOR HEX h1{color:#FF0000;} RGB h1{color:rgb(255,0,0);} TUFTS COMP 20 CHRIS TRAGANOS
  • 26. RESOURCES • Box Model Demo: http://bit.ly/13QxqE • CSS REMIX: http://cssremix.com/ • Opera Web Curriculum: http://bit.ly/tQlV3 • Intro to CSS 2.1 & CSS 3: http://bit.ly/tnrf4 • A List Apart: http://www.alistapart.com/ TUFTS COMP 20 CHRIS TRAGANOS
  • 27. THE END QUESTIONS? twitter: @ctraganos chris@arlingtoninteractive.com