The Parts of a Basic CSS Rule


The basic pattern for a line of CSS is:     selector {declaration}
for example:                        body {color: black;}

Selector
A CSS selector selects WHICH THINGS on the page you are going to modify.
We are starting off modifying tags, like the body tag.
Declaration:
The declaration controls HOW those things are modified.
Inside the declaration is a pair: property: value;
for example: body {color: black;}  
-- here the property is color: and that property's value is being set to black;


When Adding More Declarations to a CSS Rule:
Separate multiple pairs of property: value; within one CSS rule using a semicolon and a space (or a return):
body {background-color: silver; color: black;}

    - or -

body
{
   background-color: silver;
   color: black;
}


    - or -

body {
   background-color: silver;
   color: black;
}

Frequent basic CSS syntax errors: