CSS styles consist of selectors and declarations , and declarations are made up of attributes and values , as shown in:
selectors , also called selectors, indicate the elements in the Web page to which you want to apply a style rule, as in this case, the text in all segments (p) in the page will turn blue, while other elements, such as OL, will not be affected.
declaration: in English curly braces "{}" is the declaration, the attribute and the value are separated by the English colon ":". when there are multiple declarations, the middle is in English semicolon ";" Delimited , as follows: p{font-size:12px;color:red;}
Attention:
1, the last statement may not have a semicolon, but for later modification convenient, usually plus a semicolon.
2, in order to use the style easier to read, you can write each code in a new line, as follows:
P { font-size:12px; color:red;}
Knowledge Points: CSS code syntax