SlideShare una empresa de Scribd logo
1 de 100
Descargar para leer sin conexión
HTML                 4
& CSS
DINIS CORREIA 2011
              cbn
CSS     1
      HTML + CSS




        2
       CASCADE E
      INHERITANCE




        3
       ESTILIZAR
        TEXTO
3
                        ESTILIZAR
                         TEXTO




CSS

                        ⇪
na sessão anterior...
HTML + CSS
HTML + CSS   1. Inline

             2. Embed

             3. External
HTML + CSS   1. Inline

             2. Embed

             3. External
<p	
  style="color:	
  blue;">Lorem	
  ipsum	
  dolor.</p>
HTML + CSS   1. Inline

             2. Embed

             3. External
<head>
  <title>Um	
  título</title>

  <meta	
  name="description"	
  content="A	
  descrição	
  da	
  página">
  <meta	
  name="keywords"	
  content="vídeos,fotos,pesquisa">

  <style>
    p	
  {
         color:	
  blue;
    }
  </style>
</head>
HTML + CSS   1. Inline

             2. Embed

             3. External
<head>
  <title>Um	
  título</title>

  <meta	
  name="description"	
  content="A	
  descrição	
  da	
  página">
  <meta	
  name="keywords"	
  content="vídeos,fotos,pesquisa">

  <link	
  type="text/css"	
  rel="stylesheet"	
  media="screen"	
  href="style.css">
</head>
CASCADE &
INHERITANCE
User
        User   Author
agent
User
        User   Author
agent
INHERITANCE
HERDAM           NÃO HERDAM
    color          background

     font            border

letter-spacing      display

 line-height       float/clear

  list-style      height/width

  text-align         margin

 text-indent         outline

text-transform      overflow

 white-space        padding

word-spacing        position

      ...              ...
CSS

      body	
  {	
  font-­‐family:	
  Arial;	
  }
CSS



      p	
  {	
  border:	
  inherit;	
  }
CASCADE
CSS

      p	
  {	
  color:	
  blue;	
  }

      p	
  {	
  color:	
  red;	
  }
CSS

      p	
  {	
  color:	
  blue;	
  }

      p	
  {	
  color:	
  red;	
  }
CONFLITOS            1. Origem

 resolvidos	
  por   2. Especificidade

                     3. Ordem
CONFLITOS            1. Origem

 resolvidos	
  por   2. Especificidade

                     3. Ordem
1           2          3

     User
                User       Author
    agent
1                            2                           3

     User
                                 User                        Author
    agent




            4                           5

            Author                           User
                !important                  !important
CSS

             p	
  {	
  color:	
  blue;	
  }

      p	
  {	
  color:	
  red	
  !important;	
  }
User
agent    p	
  {	
  color:	
  blue;	
  }




 User




Author
User
agent    p	
  {	
  color:	
  blue;	
  }




 User    p	
  {	
  color:	
  yellow;	
  }




Author
User
agent    p	
  {	
  color:	
  blue;	
  }




 User    p	
  {	
  color:	
  yellow;	
  }




Author   p	
  {	
  color:	
  green;	
  }
User
agent    p	
  {	
  color:	
  blue;	
  }




 User    p	
  {	
  color:	
  yellow;	
  }



         p	
  {	
  color:	
  green;	
  }
Author
         p	
  {	
  color:	
  blue	
  !important;	
  }
User
agent    p	
  {	
  color:	
  blue;	
  }



         p	
  {	
  color:	
  yellow;	
  }
 User
         p	
  {	
  color:	
  black	
  !important;	
  }



         p	
  {	
  color:	
  green;	
  }
Author
         p	
  {	
  color:	
  blue	
  !important;	
  }
CONFLITOS            1. Origem

 resolvidos	
  por   2. Especificidade

                     3. Ordem
CONFLITOS            1. Origem

 resolvidos	
  por   2. Especificidade

                     3. Ordem
PONTUAÇÕES PARA CSS
FOTO DE MICHAEL PICK c
HTTP://FLIC.KR/P/6ZXG7A
p	
  {	
  color:	
  blue;	
  }

#container	
  .nav	
  p	
  {	
  color:	
  red;	
  }
Inline   ID   Class   Elements


0 0 0 0
CSS



      <p	
  style="color:	
  red;">Um	
  parágrafo.</p>




        Inline       ID         Class      Elements


         1          0 0 0
CSS



               #container	
  {	
  color:	
  red;	
  }




      Inline           ID           Class        Elements


      0                1            0 0
CSS



               .nav	
  {	
  color:	
  red;	
  }




      Inline       ID             Class           Elements


      0 0                          1               0
CSS



               p	
  {	
  color:	
  red;	
  }




      Inline     ID             Class          Elements


      0 0 0                                      1
CSS

        p	
  {	
  color:	
  blue;	
  }

      .lead	
  {	
  color:	
  red;	
  }
CSS

        p	
  {	
  color:	
  blue;	
  }

      .lead	
  {	
  color:	
  red;	
  }
CSS



      #container	
  .content	
  p	
  {	
  color:	
  red;	
  }




      Inline           ID           Class        Elements


      0               1              1              1
CSS



#container	
  .content	
  p:first-­‐line	
  {	
  color:	
  red;	
  }




        Inline          ID          Class       Elements


        0              1             2              1
CSS



  #container	
  .content	
  p	
  strong	
  {	
  color:	
  red;	
  }




       Inline           ID           Class        Elements


       0               1              1             2
CONFLITOS            1. Origem

 resolvidos	
  por   2. Especificidade

                     3. Ordem
CONFLITOS            1. Origem

 resolvidos	
  por   2. Especificidade

                     3. Ordem
CSS

      .content	
  p	
  {	
  color:	
  blue;	
  }

      .content	
  p	
  {	
  color:	
  red;	
  }
CSS

      .content	
  p	
  {	
  color:	
  blue;	
  }

      .content	
  p	
  {	
  color:	
  red;	
  }
EXERCÍCIO
FOTO DE SOCIALISBETTER c
HTTP://FLIC.KR/P/5BMFB7
User
agent
         h2	
  {	
  color:	
  blue;	
  }




 User    h2	
  {	
  color:	
  yellow;	
  }




Author
User
agent
         h2	
  {	
  color:	
  blue;	
  }




 User    h2	
  {	
  color:	
  yellow;	
  }




Author
User
agent
         h2	
  {	
  color:	
  blue;	
  }




 User    h2	
  {	
  color:	
  yellow;	
  }




Author   h2	
  {	
  color:	
  red;	
  }
User
agent
         h2	
  {	
  color:	
  blue;	
  }




 User    h2	
  {	
  color:	
  yellow;	
  }




Author   h2	
  {	
  color:	
  red;	
  }
User
agent
         h2	
  {	
  color:	
  blue;	
  }




 User    h2	
  {	
  color:	
  yellow;	
  }




         h2	
  {	
  color:	
  red;	
  }
Author
         <h2	
  style="color:	
  black;">Título</h2>
User
agent
         h2	
  {	
  color:	
  blue;	
  }




 User    h2	
  {	
  color:	
  yellow;	
  }




         h2	
  {	
  color:	
  red;	
  }
Author
         <h2	
  style="color:	
  black;">Título</h2>
User
agent
         h2	
  {	
  color:	
  blue;	
  }




         h2	
  {	
  color:	
  yellow;	
  }
 User
         h2	
  {	
  color:	
  green	
  !important;	
  }




Author   <h2	
  style="color:	
  black;">Título</h2>
User
agent
         h2	
  {	
  color:	
  blue;	
  }




         h2	
  {	
  color:	
  yellow;	
  }
 User
         h2	
  {	
  color:	
  green	
  !important;	
  }




Author   <h2	
  style="color:	
  black;">Título</h2>
CSS




      p.lead	
  {	
  color:	
  blue;	
  }

          p	
  {	
  color:	
  red;	
  }
CSS




      p.lead	
  {	
  color:	
  blue;	
  }

          p	
  {	
  color:	
  red;	
  }
CSS




      p.lead	
  {	
  color:	
  blue;	
  }

           p	
  {	
  color:	
  red;	
  }

      p.lead	
  {	
  color:	
  black;	
  }
CSS




      p.lead	
  {	
  color:	
  blue;	
  }

           p	
  {	
  color:	
  red;	
  }

      p.lead	
  {	
  color:	
  black;	
  }
CSS



      #container	
  p	
  {	
  color:	
  white;	
  }

           p.lead	
  {	
  color:	
  blue;	
  }

               p	
  {	
  color:	
  red;	
  }

          p.lead	
  {	
  color:	
  black;	
  }
CSS



      #container	
  p	
  {	
  color:	
  white;	
  }

           p.lead	
  {	
  color:	
  blue;	
  }

               p	
  {	
  color:	
  red;	
  }

          p.lead	
  {	
  color:	
  black;	
  }
ESTILIZAR
 TEXTO
ESTILIZAR
 TEXTO
 font-­‐size
CSS



      p	
  {	
  font-­‐size:	
  12px;	
  }
px
  em
   %
keywords
ABSOLUTAS
    px


RELATIVAS
   em
    %


 keywords
ABSOLUTAS
    px


RELATIVAS
   em
    %


 keywords
ABSOLUTAS
       px    font-­‐size:	
  12px;




RELATIVAS
       em    font-­‐size:	
  1.3em;

        %    font-­‐size:	
  80%;




  keywords   font-­‐size:	
  small;
CSS




      body	
  {	
  font-­‐size:	
  16px;	
  }

       p	
  {	
  font-­‐size:	
  0.86em	
  }



                          14px / 16px = 0.86
CSS




      body	
  {	
  font-­‐size:	
  62,5%;	
  }

         p	
  {	
  font-­‐size:	
  1.2em	
  }



                           10px x 1.2em = 12px
ESTILIZAR
 TEXTO
font-­‐family
CSS




  body	
  {	
  font-­‐family:	
  Helvetica,	
  Arial,	
  sans-­‐serif;	
  }
CSS




      body	
  {	
  font-­‐family:	
  "Times	
  New	
  Roman",	
  serif;	
  }
Exemplo     serif
Exemplo   sans-serif
Exemplo   monospace
Exemplo    cursive
Exemplo    fantasy
Sans-serif
  Serif
ESTILIZAR
 TEXTO
    font-­‐style
   font-­‐weight
  font-­‐variant
CSS




      p	
  {	
  font-­‐style:	
  italic;	
  }	
  

      p	
  {	
  font-­‐style:	
  oblique;	
  }	
  

      p	
  {	
  font-­‐style:	
  normal;	
  }	
  
CSS




      p	
  {	
  font-­‐variant:	
  small-­‐caps;	
  }	
  

         p	
  {	
  font-­‐variant:	
  normal;	
  }	
  
CSS




      p	
  {	
  font-­‐weight:	
  normal;	
  }	
  

       p	
  {	
  font-­‐weight:	
  bold;	
  }	
  

        p	
  {	
  font-­‐weight:	
  400;	
  }
ESTILIZAR
 TEXTO
 shorthand
CSS




 body	
  {	
  font:	
  italic	
  normal	
  bold	
  12px	
  Helvetica,	
  Arial,	
  sans-­‐serif	
  }
CSS




 body	
  {	
  font:	
  italic	
  normal	
  bold	
  12px	
  Helvetica,	
  Arial,	
  sans-­‐serif	
  }



                     -style           -weight                          -family



                            -variant

                                                -size
ESTILIZAR
   TEXTO
outras	
  propriedades
CSS



       p	
  {	
  text-­‐align:	
  right;	
  }	
  

        p	
  {	
  text-­‐align:	
  left;	
  }

      p	
  {	
  text-­‐align:	
  center;	
  }

      p	
  {	
  text-­‐align:	
  justify;	
  }	
  
CSS




      p	
  {	
  letter-­‐spacing:	
  0.05em;	
  }	
  

        p	
  {	
  word-­‐spacing:	
  0.3em;	
  }
CSS




      p	
  {	
  text-­‐indent:	
  10px;	
  }	
  
CSS




      p	
  {	
  text-­‐indent:	
  1.5em;	
  }	
  
CSS




  p	
  {	
  text-­‐transform:	
  uppercase;	
  }	
  

  p	
  {	
  text-­‐transform:	
  lowercase;	
  }

      p	
  {	
  text-­‐transform:	
  none;	
  }	
  
CSS




   p	
  {	
  text-­‐decoration:	
  underline;	
  }	
  

 p	
  {	
  text-­‐decoration:	
  line-­‐through;	
  }

      p	
  {	
  text-­‐decoration:	
  none;	
  }	
  
CSS




      p	
  {	
  line-­‐height:	
  16px;	
  }	
  

      p	
  {	
  line-­‐height:	
  1em;	
  }

      p	
  {	
  line-­‐height:	
  1.5;	
  }	
  

Más contenido relacionado

Destacado

De kracht van sociale netwerken voor klanten van de Rabobank
De kracht van sociale netwerken voor klanten van de RabobankDe kracht van sociale netwerken voor klanten van de Rabobank
De kracht van sociale netwerken voor klanten van de RabobankMarije van den Berg
 
7Pagi.com - Media Interaksi Digital Sekolah
7Pagi.com - Media Interaksi Digital Sekolah7Pagi.com - Media Interaksi Digital Sekolah
7Pagi.com - Media Interaksi Digital Sekolahyayan ardhianto
 
Zichtbaar zijn als raadslid door effectieve communicatie vng
Zichtbaar zijn als raadslid door effectieve communicatie   vngZichtbaar zijn als raadslid door effectieve communicatie   vng
Zichtbaar zijn als raadslid door effectieve communicatie vngMarije van den Berg
 
Meer social in je media (communicatieadviseurs gemeente)
Meer social in je media (communicatieadviseurs gemeente)Meer social in je media (communicatieadviseurs gemeente)
Meer social in je media (communicatieadviseurs gemeente)Marije van den Berg
 
De nieuwe communicatieprofessional
De nieuwe communicatieprofessionalDe nieuwe communicatieprofessional
De nieuwe communicatieprofessionalMarije van den Berg
 

Destacado (6)

De kracht van sociale netwerken voor klanten van de Rabobank
De kracht van sociale netwerken voor klanten van de RabobankDe kracht van sociale netwerken voor klanten van de Rabobank
De kracht van sociale netwerken voor klanten van de Rabobank
 
7Pagi.com - Media Interaksi Digital Sekolah
7Pagi.com - Media Interaksi Digital Sekolah7Pagi.com - Media Interaksi Digital Sekolah
7Pagi.com - Media Interaksi Digital Sekolah
 
Zichtbaar zijn als raadslid door effectieve communicatie vng
Zichtbaar zijn als raadslid door effectieve communicatie   vngZichtbaar zijn als raadslid door effectieve communicatie   vng
Zichtbaar zijn als raadslid door effectieve communicatie vng
 
Bab 2-intro-python
Bab 2-intro-pythonBab 2-intro-python
Bab 2-intro-python
 
Meer social in je media (communicatieadviseurs gemeente)
Meer social in je media (communicatieadviseurs gemeente)Meer social in je media (communicatieadviseurs gemeente)
Meer social in je media (communicatieadviseurs gemeente)
 
De nieuwe communicatieprofessional
De nieuwe communicatieprofessionalDe nieuwe communicatieprofessional
De nieuwe communicatieprofessional
 

Similar a HTML e CSS: Cascade e Herança

Similar a HTML e CSS: Cascade e Herança (20)

Aprender CSS (UFCD0154) v2
Aprender CSS (UFCD0154) v2Aprender CSS (UFCD0154) v2
Aprender CSS (UFCD0154) v2
 
Aw aula 04
Aw aula 04Aw aula 04
Aw aula 04
 
RCOM 11ºAno - CSS
RCOM 11ºAno - CSSRCOM 11ºAno - CSS
RCOM 11ºAno - CSS
 
Css 3
Css 3Css 3
Css 3
 
Frontline - Rails3.1
Frontline - Rails3.1Frontline - Rails3.1
Frontline - Rails3.1
 
Curso HTML e CSS Part2
Curso HTML e CSS Part2Curso HTML e CSS Part2
Curso HTML e CSS Part2
 
HTML & CSS - Aula 2
HTML & CSS - Aula 2HTML & CSS - Aula 2
HTML & CSS - Aula 2
 
Introdução ao CSS
Introdução ao CSSIntrodução ao CSS
Introdução ao CSS
 
Slides Css3
Slides Css3 Slides Css3
Slides Css3
 
Html - Aula 3
Html - Aula 3Html - Aula 3
Html - Aula 3
 
CSS: Introdução no Webdesign
CSS: Introdução no WebdesignCSS: Introdução no Webdesign
CSS: Introdução no Webdesign
 
CSS
CSSCSS
CSS
 
OOCSS - Object Oriented CSS
OOCSS - Object Oriented CSSOOCSS - Object Oriented CSS
OOCSS - Object Oriented CSS
 
Speed up! Critical css to the rescue
Speed up! Critical css to the rescueSpeed up! Critical css to the rescue
Speed up! Critical css to the rescue
 
[Curso CSS3 com Sass e Compass] Aula 07: Importando outros arquivos Sass
[Curso CSS3 com Sass e Compass] Aula 07: Importando outros arquivos Sass[Curso CSS3 com Sass e Compass] Aula 07: Importando outros arquivos Sass
[Curso CSS3 com Sass e Compass] Aula 07: Importando outros arquivos Sass
 
HTML + CSS
HTML + CSSHTML + CSS
HTML + CSS
 
Css For Beginners
Css For BeginnersCss For Beginners
Css For Beginners
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
CSS Básico
CSS BásicoCSS Básico
CSS Básico
 
Html - Aula 4
Html - Aula 4Html - Aula 4
Html - Aula 4
 

Más de Dinis Correia

WordPress & Custm Post Types
WordPress & Custm Post TypesWordPress & Custm Post Types
WordPress & Custm Post TypesDinis Correia
 
HTML&CSS 5 - Intermediate CSS (2/2)
HTML&CSS 5 - Intermediate CSS (2/2)HTML&CSS 5 - Intermediate CSS (2/2)
HTML&CSS 5 - Intermediate CSS (2/2)Dinis Correia
 
HTML&CSS 6 - Advanced CSS
HTML&CSS 6 - Advanced CSSHTML&CSS 6 - Advanced CSS
HTML&CSS 6 - Advanced CSSDinis Correia
 
HTML&CSS 3 - Introduction to CSS
HTML&CSS 3 - Introduction to CSSHTML&CSS 3 - Introduction to CSS
HTML&CSS 3 - Introduction to CSSDinis Correia
 
HTML&CSS 1 - Introduction to HTML
HTML&CSS 1 - Introduction to HTMLHTML&CSS 1 - Introduction to HTML
HTML&CSS 1 - Introduction to HTMLDinis Correia
 
HTML&CSS 2 - Intermediate HTML
HTML&CSS 2 - Intermediate HTMLHTML&CSS 2 - Intermediate HTML
HTML&CSS 2 - Intermediate HTMLDinis Correia
 

Más de Dinis Correia (6)

WordPress & Custm Post Types
WordPress & Custm Post TypesWordPress & Custm Post Types
WordPress & Custm Post Types
 
HTML&CSS 5 - Intermediate CSS (2/2)
HTML&CSS 5 - Intermediate CSS (2/2)HTML&CSS 5 - Intermediate CSS (2/2)
HTML&CSS 5 - Intermediate CSS (2/2)
 
HTML&CSS 6 - Advanced CSS
HTML&CSS 6 - Advanced CSSHTML&CSS 6 - Advanced CSS
HTML&CSS 6 - Advanced CSS
 
HTML&CSS 3 - Introduction to CSS
HTML&CSS 3 - Introduction to CSSHTML&CSS 3 - Introduction to CSS
HTML&CSS 3 - Introduction to CSS
 
HTML&CSS 1 - Introduction to HTML
HTML&CSS 1 - Introduction to HTMLHTML&CSS 1 - Introduction to HTML
HTML&CSS 1 - Introduction to HTML
 
HTML&CSS 2 - Intermediate HTML
HTML&CSS 2 - Intermediate HTMLHTML&CSS 2 - Intermediate HTML
HTML&CSS 2 - Intermediate HTML
 

HTML e CSS: Cascade e Herança

  • 1. HTML 4 & CSS DINIS CORREIA 2011 cbn
  • 2. CSS 1 HTML + CSS 2 CASCADE E INHERITANCE 3 ESTILIZAR TEXTO
  • 3. 3 ESTILIZAR TEXTO CSS ⇪ na sessão anterior...
  • 5. HTML + CSS 1. Inline 2. Embed 3. External
  • 6. HTML + CSS 1. Inline 2. Embed 3. External
  • 7. <p  style="color:  blue;">Lorem  ipsum  dolor.</p>
  • 8. HTML + CSS 1. Inline 2. Embed 3. External
  • 9. <head> <title>Um  título</title> <meta  name="description"  content="A  descrição  da  página"> <meta  name="keywords"  content="vídeos,fotos,pesquisa"> <style> p  { color:  blue; } </style> </head>
  • 10. HTML + CSS 1. Inline 2. Embed 3. External
  • 11. <head> <title>Um  título</title> <meta  name="description"  content="A  descrição  da  página"> <meta  name="keywords"  content="vídeos,fotos,pesquisa"> <link  type="text/css"  rel="stylesheet"  media="screen"  href="style.css"> </head>
  • 13.
  • 14. User User Author agent
  • 15.
  • 16. User User Author agent
  • 18.
  • 19.
  • 20. HERDAM NÃO HERDAM color background font border letter-spacing display line-height float/clear list-style height/width text-align margin text-indent outline text-transform overflow white-space padding word-spacing position ... ...
  • 21.
  • 22. CSS body  {  font-­‐family:  Arial;  }
  • 23. CSS p  {  border:  inherit;  }
  • 25. CSS p  {  color:  blue;  } p  {  color:  red;  }
  • 26. CSS p  {  color:  blue;  } p  {  color:  red;  }
  • 27. CONFLITOS 1. Origem resolvidos  por 2. Especificidade 3. Ordem
  • 28. CONFLITOS 1. Origem resolvidos  por 2. Especificidade 3. Ordem
  • 29. 1 2 3 User User Author agent
  • 30. 1 2 3 User User Author agent 4 5 Author User !important !important
  • 31. CSS p  {  color:  blue;  } p  {  color:  red  !important;  }
  • 32. User agent p  {  color:  blue;  } User Author
  • 33. User agent p  {  color:  blue;  } User p  {  color:  yellow;  } Author
  • 34. User agent p  {  color:  blue;  } User p  {  color:  yellow;  } Author p  {  color:  green;  }
  • 35. User agent p  {  color:  blue;  } User p  {  color:  yellow;  } p  {  color:  green;  } Author p  {  color:  blue  !important;  }
  • 36. User agent p  {  color:  blue;  } p  {  color:  yellow;  } User p  {  color:  black  !important;  } p  {  color:  green;  } Author p  {  color:  blue  !important;  }
  • 37. CONFLITOS 1. Origem resolvidos  por 2. Especificidade 3. Ordem
  • 38. CONFLITOS 1. Origem resolvidos  por 2. Especificidade 3. Ordem
  • 39. PONTUAÇÕES PARA CSS FOTO DE MICHAEL PICK c HTTP://FLIC.KR/P/6ZXG7A
  • 40. p  {  color:  blue;  } #container  .nav  p  {  color:  red;  }
  • 41. Inline ID Class Elements 0 0 0 0
  • 42. CSS <p  style="color:  red;">Um  parágrafo.</p> Inline ID Class Elements 1 0 0 0
  • 43. CSS #container  {  color:  red;  } Inline ID Class Elements 0 1 0 0
  • 44. CSS .nav  {  color:  red;  } Inline ID Class Elements 0 0 1 0
  • 45. CSS p  {  color:  red;  } Inline ID Class Elements 0 0 0 1
  • 46. CSS p  {  color:  blue;  } .lead  {  color:  red;  }
  • 47. CSS p  {  color:  blue;  } .lead  {  color:  red;  }
  • 48. CSS #container  .content  p  {  color:  red;  } Inline ID Class Elements 0 1 1 1
  • 49. CSS #container  .content  p:first-­‐line  {  color:  red;  } Inline ID Class Elements 0 1 2 1
  • 50. CSS #container  .content  p  strong  {  color:  red;  } Inline ID Class Elements 0 1 1 2
  • 51. CONFLITOS 1. Origem resolvidos  por 2. Especificidade 3. Ordem
  • 52. CONFLITOS 1. Origem resolvidos  por 2. Especificidade 3. Ordem
  • 53. CSS .content  p  {  color:  blue;  } .content  p  {  color:  red;  }
  • 54. CSS .content  p  {  color:  blue;  } .content  p  {  color:  red;  }
  • 55.
  • 56. EXERCÍCIO FOTO DE SOCIALISBETTER c HTTP://FLIC.KR/P/5BMFB7
  • 57. User agent h2  {  color:  blue;  } User h2  {  color:  yellow;  } Author
  • 58. User agent h2  {  color:  blue;  } User h2  {  color:  yellow;  } Author
  • 59. User agent h2  {  color:  blue;  } User h2  {  color:  yellow;  } Author h2  {  color:  red;  }
  • 60. User agent h2  {  color:  blue;  } User h2  {  color:  yellow;  } Author h2  {  color:  red;  }
  • 61. User agent h2  {  color:  blue;  } User h2  {  color:  yellow;  } h2  {  color:  red;  } Author <h2  style="color:  black;">Título</h2>
  • 62. User agent h2  {  color:  blue;  } User h2  {  color:  yellow;  } h2  {  color:  red;  } Author <h2  style="color:  black;">Título</h2>
  • 63. User agent h2  {  color:  blue;  } h2  {  color:  yellow;  } User h2  {  color:  green  !important;  } Author <h2  style="color:  black;">Título</h2>
  • 64. User agent h2  {  color:  blue;  } h2  {  color:  yellow;  } User h2  {  color:  green  !important;  } Author <h2  style="color:  black;">Título</h2>
  • 65. CSS p.lead  {  color:  blue;  } p  {  color:  red;  }
  • 66. CSS p.lead  {  color:  blue;  } p  {  color:  red;  }
  • 67. CSS p.lead  {  color:  blue;  } p  {  color:  red;  } p.lead  {  color:  black;  }
  • 68. CSS p.lead  {  color:  blue;  } p  {  color:  red;  } p.lead  {  color:  black;  }
  • 69. CSS #container  p  {  color:  white;  } p.lead  {  color:  blue;  } p  {  color:  red;  } p.lead  {  color:  black;  }
  • 70. CSS #container  p  {  color:  white;  } p.lead  {  color:  blue;  } p  {  color:  red;  } p.lead  {  color:  black;  }
  • 73. CSS p  {  font-­‐size:  12px;  }
  • 74. px em % keywords
  • 75. ABSOLUTAS px RELATIVAS em % keywords
  • 76.
  • 77. ABSOLUTAS px RELATIVAS em % keywords
  • 78. ABSOLUTAS px font-­‐size:  12px; RELATIVAS em font-­‐size:  1.3em; % font-­‐size:  80%; keywords font-­‐size:  small;
  • 79. CSS body  {  font-­‐size:  16px;  } p  {  font-­‐size:  0.86em  } 14px / 16px = 0.86
  • 80. CSS body  {  font-­‐size:  62,5%;  } p  {  font-­‐size:  1.2em  } 10px x 1.2em = 12px
  • 82. CSS body  {  font-­‐family:  Helvetica,  Arial,  sans-­‐serif;  }
  • 83. CSS body  {  font-­‐family:  "Times  New  Roman",  serif;  }
  • 84. Exemplo serif Exemplo sans-serif Exemplo monospace Exemplo cursive Exemplo fantasy
  • 86. ESTILIZAR TEXTO font-­‐style font-­‐weight font-­‐variant
  • 87. CSS p  {  font-­‐style:  italic;  }   p  {  font-­‐style:  oblique;  }   p  {  font-­‐style:  normal;  }  
  • 88. CSS p  {  font-­‐variant:  small-­‐caps;  }   p  {  font-­‐variant:  normal;  }  
  • 89. CSS p  {  font-­‐weight:  normal;  }   p  {  font-­‐weight:  bold;  }   p  {  font-­‐weight:  400;  }
  • 91. CSS body  {  font:  italic  normal  bold  12px  Helvetica,  Arial,  sans-­‐serif  }
  • 92. CSS body  {  font:  italic  normal  bold  12px  Helvetica,  Arial,  sans-­‐serif  } -style -weight -family -variant -size
  • 93. ESTILIZAR TEXTO outras  propriedades
  • 94. CSS p  {  text-­‐align:  right;  }   p  {  text-­‐align:  left;  } p  {  text-­‐align:  center;  } p  {  text-­‐align:  justify;  }  
  • 95. CSS p  {  letter-­‐spacing:  0.05em;  }   p  {  word-­‐spacing:  0.3em;  }
  • 96. CSS p  {  text-­‐indent:  10px;  }  
  • 97. CSS p  {  text-­‐indent:  1.5em;  }  
  • 98. CSS p  {  text-­‐transform:  uppercase;  }   p  {  text-­‐transform:  lowercase;  } p  {  text-­‐transform:  none;  }  
  • 99. CSS p  {  text-­‐decoration:  underline;  }   p  {  text-­‐decoration:  line-­‐through;  } p  {  text-­‐decoration:  none;  }  
  • 100. CSS p  {  line-­‐height:  16px;  }   p  {  line-­‐height:  1em;  } p  {  line-­‐height:  1.5;  }