List of CSS Selectors that Gimme Supports

*
any element

E
an element of type E

E[foo]
an E element with a "foo" attribute

E[foo="bar"]
an E element whose "foo" attribute value is exactly equal to "bar"

E[foo~="bar"]
an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar"

E[foo^="bar"]
an E element whose "foo" attribute value begins exactly with the string "bar"

E[foo$="bar"]
an E element whose "foo" attribute value ends exactly with the string "bar"

E[foo*="bar"]
an E element whose "foo" attribute value contains the substring "bar"

E[foo|="en"]
an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en"

E:nth-child(n)
an E element, the n-th child of its parent

E:nth-last-child(n)
an E element, the n-th child of its parent, counting from the last one

E:first-child
an E element, first child of its parent

E:last-child
an E element, last child of its parent

E:only-child
an E element, only child of its parent

E:contains(somestring)
an E element whose text content (or possibly innerHTML) contains the string "someString"

E.warning
an E element whose class is "warning"

E#myid
an E element with ID equal to "myid"

E F
an F element descendant of an E element

E > F
an F element child of an E element

E + F
an F element immediately preceded by an E element

E ~ F
an F element preceded by an E element

Last edited Dec 3, 2009 at 9:10 PM by sstchur, version 3

Comments

No comments yet.