CSS is a cascading style sheet (cascading style sheets), a style that defines how HTML elements are displayed, and is a language that truly enables Web performance and content categorization.
"1" CSS basic syntax
"2" CSS two ways to combine
"3" several selectors
Basic syntax
The basic syntax is also two, in the head using Selector selection, and then used in body, the following style property key: Style attribute value 1 Style property value 2 ... is a conjunction of multiple property values.
<! DOCTYPE html>
two ways to combine
<! DOCTYPE html>
Tag Selector
Using HTML tags, such as P, H1, A, etc., can also be HTML
<span style= "FONT-SIZE:18PX;" ><! DOCTYPE html>
ID Selector
Specifying styles in a way that is independent of document elements
<! DOCTYPE html>
class SelectorIn fact, the class selector is similar to the ID selector.
<! DOCTYPE html>
Pseudo class SelectorThis can control some of the status of the label, with other selectors to use together
<! DOCTYPE html>
Composite SelectorBy combining IDs, classes, and elements together, you can see that they are used separately in the body and are combined in a style.
<! DOCTYPE html>
CSS basic syntax and selectors