====== CSS 2.1 Selectors ====== ===== * ===== Matches any element. ===== E ===== Matches any E element (i.e., an element of type E). ===== E F ===== Matches any F element that is a descendant of an E element. ===== E > F ===== Matches any F element that is a child of an element E. ===== E:first-child ===== Matches element E when E is the first child of its parent. ===== E:last-child ===== Matches element E when E is the last child of its parent. ===== E:link, E:visited ===== Matches element E if E is the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited). ===== E:active, E:hover, E:focus ===== Matches E during certain user actions. ===== E + F ===== Matches any F element immediately preceded by a sibling element E. ===== E[foo] ===== Matches any E element with the "foo" attribute set (whatever the value). ===== E[foo="warning"] ===== Matches any E element whose "foo" attribute value is exactly equal to "warning". ===== E[foo~="warning"] ===== Matches any E element whose "foo" attribute value is a list of space-separated values, one of which is exactly equal to "warning". ===== E[foo~="warning"] ===== Matches any E element whose "foo" attribute value is a list of space-separated values, one of which is exactly equal to "warning". ===== E[lang|="en"] ===== Matches any E element whose "lang" attribute has a hyphen-separated list of values beginning (from the left) with "en". ===== DIV.warning ===== The same as DIV[class~="warning"] ===== E#myid ===== Matches any E element with ID equal to "myid". ====== CSS 3.0 Selectors ====== ===== E[foo^="val"] ===== Matches any E element having "foo" attribute whose value begins with the prefix "val". ===== E[foo$="val"] ===== Matches any E element having "foo" attribute whose value ends with the suffix "val". ===== E[foo*="val"] ===== Matches any E element having "foo" attribute whose value contains at least one instance of the substring "val". ===== E:nth-child(An+B) ===== Matches any E element which is //B//th child of an parent element after all its children have been split into groups of //A// elements each. //A// and //B// are integer numbers. ===== E:nth-last-child(An+B) ===== Matches any E element which is Bth child of an parent element after all its children have been split into groups of A elements each and counting from last to first direction. ====== H-SMILE Specific Selectors ====== ===== E:current ===== Matches "current" elements, e.g. this selector matches current ''