'Style' for those who can't wait!

Note

This is your style file. Whatever you do, do not change the format of the file. By this, is meant: the curly brackets, the hash sign (#), the full stop, the colons and the semi-colons.

body {
   background-color: #ffffaa;
   color: #000099;
   margin-left: 5%;
   font-family: Arial, verdana, Helvetica, sans-serif;
   font-size: small;
}
.cen {
   height: auto;
   margin-left: auto;
   margin-right: auto;
   text-align: center;
}

'body' and '.cen' are known as selectors. 'body' refers to the body tag. in other words these style rules apply to the whole page. The '.cen' on the other hand applies where you see the attribute 'class="cen"'. 'cen' is a made up name (short for centre). Once you feel happy with it, try making some small changes, so that you get a better feel for style.

All the other lines are 'rules' each comprising a 'property' and a 'value'.

Let's go through it one rule (or more) at a time.

Notes

Note

Take a careful note of the American spelling of 'color' and 'center'. When you start writing web pages it is one of the most frequent spelling 'mistakes'.

Previous Lesson previous lesson next lesson Next Lesson