The structure (syntax) of CSS commands
Building a CSS statement is actually very simple. Important in the first step is understanding the structure of the CSS statements (In the language of computer freaks: syntax).
CSS statement simply described in plain English:
What should have for what property a certain value
The “what” term in computer slang is “selector”
Selector {Property: Value;}
Here an example to define a color for h2 tags:
h2 { color: red; }
Curly braces in CSS
The curly braces {} include the combination property and value. The braces are important because it is possible (and very common in practice), to give different properties to an element:
Selector {Property1: value1; Property 2: value2; Property3: value3; }
Colon and semicolon
Between the property and the Value you must insert a colon and after the Value a semicolon. If you forget one of these signs you CSS styling will not work!