CSS Declaration Examples

For the moment - reproduce this code in your CSS Style Sheet

BODY Formatting Example

body {
  background-color: lightblue;
  color: navy;
  text-align: right;
}

Header Formatting Example

h3 {
    text-align: center;
    color: pink;
    word-spacing: 25px;
    outline: 2px dashed blue
    }

You can make more than one formatting plan for paragraphs (or any tag)

 p {
      color: black;
      text-align: left;
      padding-left: 50px;
      }
//padding is the space between the content and the  border


#purple{ //creates a format called purple (type the # in CSS page)

     color: purple;
     text-align: center;
     font: italic bold 12px/30px Georgia, serif;
     }
     

Last updated