CSS Basics

CpSc 130 - Intro to Programming and Computing


Cascading Style Sheets Basics


Lets try it:
  1. Save this page (CSS.html) and modify it by adding style to the head
  2. Modify body tag to have :
      background-color of  white
      color of  black 
      font-family of sans-serif
      margin of 1.5em
      margin-top of 0em
      margin-right of 1em
    
  3. Modify pre tag to have :
      margin-top of 0.5em
      margin-bottom of 0.5em
      font-family of monospace
    
  4. Modify li tag to have :
      font-weight of bold
    
  5. Modify hr tag to have :
      background-color of rgb(24,95,153)
      border-style of none
      height of 2px
    
  6. The details of each property are here
  7. Styled page should look like this