WEEK: 7
Active: Not Currently Active
Work Due:

Property and Value

Inside the declaration, you specify how to style the selected element with property, value pairs.

The pair is separated with a colon (:).

Additional declarations are separated with a semicolon (;), and are typically placed on new lines.

h1 {
    property1: value;
    property2: value;
}

Property

The property is the aspect about the element that you want to change.

Value

The value defines how to change a property.

NOTE: As a rule, there should be no spaces in your property or you value. Each will be a non-breaking set of characters.

/* The following would set the background color for the
entire body element (usually the whole page) to 'blue'. */
body {
    background-color: blue;
}

Knowing the Properties

There are a lot properties that can be changed about an element. We will go over many, but not all of these. Luckily, many of the properties that you might want to change are intuitively labeled. For example, the above example identified the “background color” to change. This property is the name of the aspect you want to change, with the words separated by a dash. All multi-word properties in CSS are ‘dash’ separated.

You can see a full list of properties at:


Next section: