h3 All nodes that are heading level 3 h3:first-child All nodes that are the first children of a h3 header #main A node with id="main" [1] #main h3 All h3 nodes that are contained by a node with id="main" [1] div#main Only select a node with
h3
All nodes that are heading level 3
h3:first-child
All nodes that are the first children of a
<h3> header
#main
A node with
id="main" [1]
#main h3
All
<h3> nodes that are contained by a node with
id="main" [1]
div#main
Only select a node with
id="main" if it is a
<div>
div#main h3
All nodes that are
<h3> contained in a
<div> with an
id="main"
#main div > h3
All
<h3> nodes that are immediate children of a
<div> contained within a node that has
id="main" [1]
.foo
All nodes with a
class="foo"
.foo.bar
All nodes that have both
foo and
bar classes
#main > h3
All
<h3> nodes that are immediate children of a node with
id="main"[1]
#main > *
All immediate children of a node with
id="main" [1]
.foo > *
All immediate children of a nodes with a
class="foo"
.foo, .bar
All nodes with a
class="foo" or a
class="bar"
[foo]
All nodes with an attribute of
foo
[foo$=\"thud\"]
All nodes with an attribute of
foo where the value ends in
thud
[foo$=thud]
All nodes with an attribute of
foo where the value ends in
thud
[foo$=\"thudish\"]
All nodes with an attribute of
foo where the value ends in
thudish
#main [foo$=thud]
All nodes with an attribute of
foo where the value ends in
thud that are contained within a node with an
id="main" [1]
#main [ title $= thud ]
All nodes with an attribute of
title where the value ends in
thud that are contained within a node with an
id="main" [1]
#main span[ title $= thud ]
All
<span> nodes with an attribute of
title where the value ends in
thud that are contained within a node with an
id="main" [1]
[foo|=\"bar\"]
All nodes with an attribute of
foo where the value contains
bar in a dash seperated list (e.g.
foo="baz-bar-qat")
[foo|=\"bar-baz\"]
All nodes with an attribute of
foo where the value contains
bar-baz in a dash seperated list (e.g.
foo="qat-bar-baz-qip")
.foo:nth-child(2)
The 2nd children of nodes with a
style="foo"
>
All immediate childen
> *
All immediate children
> [qux]
All immediate children that have an attribute of
qux
.foo + span
All nodes that are a
<span> that are directly after a node with a
style="foo"
.foo ~ span
All nodes that are a
<span> that are siblings that follow a node with a
style="foo"
#foo ~ *
All nodes that are siblings that follow a node with an
id="foo" [1]
#foo ~
All nodes that are siblings that follow a node with an
id="foo" [1]
#mainspan.foo:not(span:first-child)
All nodes that are a
<span> with a
class="foo" but not a
<span> and the first child of a node with an
id="foo".
#main span.foo:not(:first-child)
All nodes that are a
<span> with a
class="foo" but not the first child of a node with an
id="foo". [1]
#main > h3:nth-child(odd)
All nodes that are
<h3> and the odd immediate children of a node with an
id="main" [1]
#main h3:nth-child(odd)
All nodes that are
<h3> and are odd children contained within a node with an
id="main" [1]
#main h3:nth-child(2n+1)
All nodes that are
<h3>
#main h3:nth-child(even)
#main h3:nth-child(2n)
Every other nodes that are
<h3>
#main2 > :checked
#main2 >input[type=checkbox]:checked
#main2 >input[type=radio]:checked