-- 1 --
Style = "color: Orange")> ID selector (name)> class selector> label selector (P)
Multiple category selectors. The former prevails. (Class = "purple red") Purple
[The more special the style (the more targeted), the higher the priority]
-- 2 --
CSS writing
Generally, only the class or ID is defined for the outer mark.
The inner layer tag is nested,
When the sub-tag cannot use this rule, it is declared separately,
Eg: ul Li {...} can set an ID or class for a li
P span {color: Blue} tags for all descendants
P> span {color: Blue} for child tags
Set CSS using inheritance features
Eg: ul Li {color: Green}
-- 3 --
Cascade: a solution with multiple selectors setting for a single attribute = conflict
Inheritance: According to the HTML structure, CSS is set from the parent to the child, and the child inherits all styles from the parent. You can also modify the style of the child itself (without affecting the parent)