A CSS declaration is a property-value pair: an instruction telling the browser how to display part of a page. For example, `font-size: 36px;` asks the browser to make text 36 pixels tall. section 2.3
Build a declaration from these pieces:
- Write the property name, such as `color`, `font-size`, `margin`, or `display`. section 2.3
- Add a colon, a value, and any necessary unit: `font-size: 36px`. section 2.3
- Finish with a semicolon. The final declaration in a group may omit it, but keeping it makes styles easier to extend. section 2.3
- Place declarations inside curly braces to form a declaration block; attach that block to a selector to create a style rule. section 2.16 section 2.3
A declaration in action
This rule contains one declaration: `h1 { font-size: 36px; }`. The `h1` selector chooses the headings, while `font-size: 36px;` supplies the browser’s presentation instruction. A declaration can also activate a larger feature: `.container { display: grid; }` turns the element into a grid container. section 2.3 section 13.2
h1 { #1
font-size: 36px; #2
} #3
Inspect the compact `h1` rule to see the selector, declaration, and closing brace together. section 2.3



