CSS Selectors: Selectors determines which HTML element to apply the styles to.
Decoration Blocks: Consists of one or more style rules, enclosed in curly braces {}.
Declarations: Are the style rules, written in property: value pairs.
1 2 3 |
body{ background-color: red; } |
body is a selector. background is the property. red is the value that changes the background property.
Example
1 2 3 4 5 |
p{ background-color: green; font-size: 30px; color:white; } |