The anatomy of a CSS rule
Selector, braces and declarations.
A rule has two main parts: the selector, which decides what elements are targeted, and the declaration block, which defines the visual changes to apply.
Inside the braces, every declaration follows the same pattern: property, colon, value and semicolon. That consistency is part of what makes CSS easy to scan once you get used to it.
- `selector { property: value; }`
- Multiple declarations live in the same block.
- Even though the last semicolon can be omitted, keeping it is a good habit.