| Character type |
Expression |
Description |
| Attribute selector for substring matching |
E [att ^ = "val"] |
Matches an eelement with the att attribute and whose value starts with val. |
| Attribute selector for substring matching |
E [att $ = "val"] |
Matches the eelement with the att attribute and whose values end with val. |
| Attribute selector for substring matching |
E [att * = "val"] |
Matches eelements with att attributes and values containing val |
| Structured pseudo-category |
E: root |
Match the root element of the document. In HTML, the root element is always HTML |
| Structured pseudo-category |
E: nth-child (n) |
Matches the nth child element E in the parent element |
| Structured pseudo-category |
E: nth-last-child (n) |
Matches the nth child element E in the parent element |
| Structured pseudo-category |
E: nth-of-type (n) |
Matches the nth sibling element E of the same type |
| Structured pseudo-category |
E: nth-last-of-type (n) |
Matches the nth sibling element E in the same type |
| Structured pseudo-category |
E: last-child |
Match the last eelement in the parent element |
| Structured pseudo-category |
E: first-of-type |
Matches the first eelement in the sibling element |
| Structured pseudo-category |
E: only-child |
Matches E that belongs to the unique child element of the parent element. |
| Structured pseudo-category |
E: only-of-type |
Matching E that belongs to the unique sibling element of the same type |
| Structured pseudo-category |
E: empty |
Matching element E without any child elements (including text nodes) |
| Target pseudo class |
E: target |
Matching the eelement pointed to by the relevant URL |
| Pseudo-type of UI element status |
E: enabled |
Matches all the available eelements in the form. |
| Pseudo-type of UI element status |
E: disabled |
Matches all the eelements in the unavailable state in the form. |
| Pseudo-type of UI element status |
E: checked |
Matches element E in the selected state on all user interfaces (form forms). |
| Pseudo-type of UI element status |
E: selection |
Matches the selected or highlighted part of an eelement. |
| Negative pseudo class |
E: not (s) |
Matching all elements E with the simple selector s that do not match |
| Common sibling element selector |
E ~ F |
F element after matching the eelement |