CSS Review

Cascading Style Sheets (CSS)

CSS rules

/* This is a comment */
selector {
  property1: value1;
  property2: value2;
  property3: vaule3:
}

Style rule example

/*
This rule changes the font size for paragraph
elements to small and the text color to green
*/
p {
  font-size: small;
  color: green;
}

Attaching Style Sheets to the Document

Document Structure and Inheritance

Example Document Structure
Example Document Structure

Selectors

Pseudo-class Selectors

Conflicting Style Sheet Rules

Specificity

The Box Model

CSS box model
CSS box model