Starlit Daily

📚 › CSS: style and layout

1. Rules: selector and declarations

A CSS rule has a selector and declarations inside braces. The selector picks the elements to style. Each declaration is a property, a colon, a value and a semicolon.

Example: h1 { color: navy; } picks every h1 and makes its text navy.

Show example

h1 {
  color: navy;
}

✍️ Your turn

Make every h1 green.

← Back to course