Anatomy of a CSS Rule - jpjohnsonjr/learning-notes GitHub Wiki

A CSS rule looks like this:

p {
  color: blue;
  font-size: 20px;
  width: 200px;
}

In the example above:

  • p is the selector
  • color is a property
  • blue; is a declaration

All of it together is the stylesheet. In the example shown, stylesheet has been placed directly into the <head> portion of the file. Will explain later where it should really go.

⚠️ **GitHub.com Fallback** ⚠️