One. Selector mode
Pattern/meaning/content description
*
matches any element. (Universal selector)
E
Matches any element e (for example, an element of type E). (type selector)
E F
Matches any descendant element F of element E. (descendant selector)
E > F
Matches any child element F of element E. (sub selector)
E:first-child
When Element e is the first child element in its parent element, the match element E. (: First-child pseudo Class)
E:link e:visited
Match element E If E is a destination that has not been accessed (: link) or a hyperlink that has already visited (: visited). (Link pseudo Class)
E:active E:hover E:focus
Match E in the determined user action. (Dynamic pseudo Class)
E:lang (c)
If an element of type E uses the (human) language C (the document language determines how the language is determined), the element is matched. (: lang () pseudo class)
E + F
If an element E is directly before the element F, then the element f is matched. (near selector)
E[foo]
Matches any element E that has an "foo" attribute set (regardless of its value). (Property selector)
e[foo= "Warning"]
Matches any element E whose "foo" attribute value is strictly equal to "warning". (Property selector)
e[foo~= "Warning"]
Matches a list of values whose "Foo" property value is a space-delimited, and one of them is strictly equal to any element E of "warning". (Property selector)
E[lang|= "en"]
Any element E that matches its "Lang" property with a list of values beginning with "en" (from the left). (Property selector)
Div.warning
HTML only. Usage with div[class~= "warning"]. (class selector)
E#myid
Any element E that matches the ID equal to "myID". (ID selector)