Edit online

CSS Selectors

The following table summarizes the selectors supported by Oxygen PDF Chemistry:

Pattern Meaning Described in section CSS level
* Any element Universal selector 2
E An element of type E Type element selector 1
E[foo] An E element with the "foo" attribute set Attribute selectors 2
E[foo="bar"] An E element whose "foo" attribute value is exactly equal to "bar" Attribute selectors 2
E[foo~="bar"] An E element whose "foo" attribute value is a list of space-separated values, one of which is exactly equal to "bar" Attribute selectors 2
E[foo^="bar"] An E element whose "foo" attribute value begins exactly with the string "bar" Attribute selectors 3
E[foo$="bar"] An E element whose "foo" attribute value ends exactly with the string "bar" Attribute selectors 3
E[foo*="bar"] An E element whose "foo" attribute value contains the substring "bar" Attribute selectors 3
E[lang|="en"] An E element whose "lang" attribute has a hyphen-separated list of values beginning (from the left) with "en" Attribute selectors 2
E:root An E element, root of the document Structural pseudo-classes 3
E:first-child An E element, first child of its parent Structural pseudo-classes 2
E:last-child An E element, last child of its parent Structural pseudo-classes 3
E:first-of-type An E element, first sibling of its type Structural pseudo-classes 3
E:last-of-type An E element, last sibling of its type Structural pseudo-classes 3
E:only-of-type An E element, only sibling of its type Structural pseudo-classes 3
E:only-child An E element, only child of its parent Structural pseudo-classes 3
E:nth-child(n) An E element, the n-th child of its parent Structural pseudo-classes 3
E:nth-of-type(n) An E element, the n-th sibling of its type Structural pseudo-classes 3
E:empty An E element that has no children (including text nodes) Structural pseudo-classes 3
E:lang(c) An element of type E in (human) language c (the document language specifies how language is determined) The :lang() pseudo-class 2
E:has(F) An E element with the condition F applying to one of its children. Similar to the subject selector described in:The subject element pseudo-class. Extension. 3
E:first-letter The first formatted letter of an E element The :first-letter pseudo-element 1
E:before Generated content before an E element The :before pseudo-element 2
E:after(n) Generated content after an E element. Setting a value of 1 creates a normal :before. A higher value means the generated content is further from the element. Extension
E:after Generated content after an E element The :after pseudo-element 2
E:before(n) Generated content before an E element. Setting a value of 1 creates a normal :before. A higher value means the generated content is further from the element. Extension
E:marker Generated by list items to represent the item’s marker (the bullet or number identifying each item). E is supposed to have display list-item Marker pseudo-element 3
E#myid An E element, its ID being equal to "myid" ID selectors 1
E F An F element descendant of an E element Descendant combinator 1
E > F An F element child of an element E Child combinator 2
E + F An F element immediately preceded by an element E Direct adjacent combinator 2
E ~ F An F element preceded by an element E Indirect adjacent combinator 3