CSS Syntax
The following CSS syntax is supported.
To use XPath syntax, prefix the
contextvalue withxpath:
Special tags
Textall p, li (without p), and td (without p) elements.TextAndHeadersalso include h1 - h7.AnyTextincludes any element with text. For example, adivwith text, e.g.<div>text</div>.:headersall h1 - h7 elements.
Tag Selectors
*all elementsdivall div tagsdiv,pall divs and paragraphsdiv pparagraphs inside divsdiv > pall p tags, one level deep in divdiv + pp tags immediately after divdiv ~ pp tags preceded by div.classnameall elements with class#idnameelement with IDdiv.classnamedivs with certain classnamediv#idnamediv with certain ID#idname *all elements inside#idname
Attribute Selectors
a[target]a tags with the target attribute.a[target="_blank"]atags where thetargetattribute equals_blank[title~="chair"]title element containing a word[class^="chair"]class starts with chair[class|="chair"]class starts with the chair word[class*="chair"]class contains chair[class$="chair"]class ends with chair[class%="\bchair\b"]class matches the regex\bchair\b
Pseudo Selectors/Functions
div:emptyelement with no childrenp:emptybreakingempty element with only spaces, but not non-breaking spaces.p:first-of-typefirst of some typep:last-of-typelast of some type:not(span)element that's not a spanp:first-childfirst child of its parentp:last-childlast child of its parentp:nth-child(2)second child of its parentp:nth-child(3n+1)nth-child (an + b) formulap:nth-last-child(2)second child from behindp:nth-of-type(2)second p of its parentp:nth-last-of-type(2)...from behindp:only-of-typeunique of its parentp:only-childonly child of its parentp:has(br)element that contains another elementp:contains(text)element that contains textp:regex('regex')element that matches the regex (case sensitive)'regex'.p:iregex('regex')element that matches the regex (case insensitive)'regex'.