SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
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

Más contenido relacionado

Último

Piece by Piece Magazine
Piece by Piece Magazine                      Piece by Piece Magazine
Piece by Piece Magazine CharlottePulte
 
General Knowledge Quiz Game C++ CODE.pptx
General Knowledge Quiz Game C++ CODE.pptxGeneral Knowledge Quiz Game C++ CODE.pptx
General Knowledge Quiz Game C++ CODE.pptxmarckustrevion
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfAayushChavan5
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Rndexperts
 
Unit1_Syllbwbnwnwneneneneneneentation_Sem2.pptx
Unit1_Syllbwbnwnwneneneneneneentation_Sem2.pptxUnit1_Syllbwbnwnwneneneneneneentation_Sem2.pptx
Unit1_Syllbwbnwnwneneneneneneentation_Sem2.pptxNitish292041
 
Map of St. Louis Parks
Map of St. Louis Parks                              Map of St. Louis Parks
Map of St. Louis Parks CharlottePulte
 
world health day 2024.pptxgbbvggvbhjjjbbbb
world health day 2024.pptxgbbvggvbhjjjbbbbworld health day 2024.pptxgbbvggvbhjjjbbbb
world health day 2024.pptxgbbvggvbhjjjbbbbpreetirao780
 
Karim apartment ideas 02 ppppppppppppppp
Karim apartment ideas 02 pppppppppppppppKarim apartment ideas 02 ppppppppppppppp
Karim apartment ideas 02 pppppppppppppppNadaMohammed714321
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIyuj
 
Iconic Global Solution - web design, Digital Marketing services
Iconic Global Solution - web design, Digital Marketing servicesIconic Global Solution - web design, Digital Marketing services
Iconic Global Solution - web design, Digital Marketing servicesIconic global solution
 
10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designersPixeldarts
 
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道yrolcks
 
guest bathroom white and blue ssssssssss
guest bathroom white and blue ssssssssssguest bathroom white and blue ssssssssss
guest bathroom white and blue ssssssssssNadaMohammed714321
 
10 Best WordPress Plugins to make the website effective in 2024
10 Best WordPress Plugins to make the website effective in 202410 Best WordPress Plugins to make the website effective in 2024
10 Best WordPress Plugins to make the website effective in 2024digital learning point
 
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书zdzoqco
 
The spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyThe spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyChristopher Totten
 
cda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptcda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptMaryamAfzal41
 
AI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
AI and Design Vol. 2: Navigating the New Frontier - MorgenboosterAI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
AI and Design Vol. 2: Navigating the New Frontier - Morgenbooster1508 A/S
 
Karim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppKarim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppNadaMohammed714321
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...Rishabh Aryan
 

Último (20)

Piece by Piece Magazine
Piece by Piece Magazine                      Piece by Piece Magazine
Piece by Piece Magazine
 
General Knowledge Quiz Game C++ CODE.pptx
General Knowledge Quiz Game C++ CODE.pptxGeneral Knowledge Quiz Game C++ CODE.pptx
General Knowledge Quiz Game C++ CODE.pptx
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdf
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025
 
Unit1_Syllbwbnwnwneneneneneneentation_Sem2.pptx
Unit1_Syllbwbnwnwneneneneneneentation_Sem2.pptxUnit1_Syllbwbnwnwneneneneneneentation_Sem2.pptx
Unit1_Syllbwbnwnwneneneneneneentation_Sem2.pptx
 
Map of St. Louis Parks
Map of St. Louis Parks                              Map of St. Louis Parks
Map of St. Louis Parks
 
world health day 2024.pptxgbbvggvbhjjjbbbb
world health day 2024.pptxgbbvggvbhjjjbbbbworld health day 2024.pptxgbbvggvbhjjjbbbb
world health day 2024.pptxgbbvggvbhjjjbbbb
 
Karim apartment ideas 02 ppppppppppppppp
Karim apartment ideas 02 pppppppppppppppKarim apartment ideas 02 ppppppppppppppp
Karim apartment ideas 02 ppppppppppppppp
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AI
 
Iconic Global Solution - web design, Digital Marketing services
Iconic Global Solution - web design, Digital Marketing servicesIconic Global Solution - web design, Digital Marketing services
Iconic Global Solution - web design, Digital Marketing services
 
10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers
 
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
 
guest bathroom white and blue ssssssssss
guest bathroom white and blue ssssssssssguest bathroom white and blue ssssssssss
guest bathroom white and blue ssssssssss
 
10 Best WordPress Plugins to make the website effective in 2024
10 Best WordPress Plugins to make the website effective in 202410 Best WordPress Plugins to make the website effective in 2024
10 Best WordPress Plugins to make the website effective in 2024
 
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
 
The spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyThe spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenology
 
cda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptcda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis ppt
 
AI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
AI and Design Vol. 2: Navigating the New Frontier - MorgenboosterAI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
AI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
 
Karim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppKarim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 ppppppppppppppp
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
 

Destacado

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 HubspotMarius Sescu
 
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 ChatGPTExpeed Software
 
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 EngineeringsPixeldarts
 
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 HealthThinkNow
 
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.pdfmarketingartwork
 
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 2024Neil Kimberley
 
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)contently
 
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 2024Albert Qian
 
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 InsightsKurio // The Social Media Age(ncy)
 
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 2024Search Engine Journal
 
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 summarySpeakerHub
 
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 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 Tessa Mero
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
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 managementMindGenius
 
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...RachelPearson36
 

Destacado (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