Pattern | Description |
---|---|
E[att^="val"] | Matches any E element whose att attribute value begins with "val". |
E[att$="val"] | Matches any E element whose att attribute value ends with “val". |
E[att*="val"] | Matches any E element whose att attribute value contains the substring “val". |
E:root | Matches the document’s root element. In HTML, the root element is always the HTML element. |
E:nth-child(n) | Matches any E element that is the n-th child of its parent. |
E:nth-last-child(n) | Matches any E element that is the n-th child of its parent, counting from the last child. |
E:nth-of-type(n) | Matches any E element that is the n-th sibling of its type. |
E:nth-last-of-type(n) | Matches any E element that is the n-th sibling of its type, counting from the last sibling. |
E:last-child | Matches any E element that is the last child of its parent. |
E:first-of-type | Matches any E element that is the first sibling of its type. |
E:last-of-type | Matches any E element that is the last sibling of its type. |
E:only-child | Matches any E element that is the only child of its parent. |
E:only-of-type | Matches any E element that is the only sibling of its type. |
E:empty | Matches any E element that has no children (including text nodes). |
E:target | Matches an E element that is the target of the referring URL. |
E:enabled | Matches any user interface element (form control) E that is enabled. |
E:disabled | Matches any user interface element (form control) E that is disabled. |
E:checked | Matches any user interface element (form control) E that is checked. |
E::selection | Matches the portion of an element E that is currently selected or highlighted by the user. |
E:not(s) | Matches any E element that does not match the simple selector s. |
E ~ F | Matches any F element that is preceded by an E element. |
Taken from 456 BereaSt