Selects the first child of an element
Selects all sibling elements
Selects the immediately next sibling of an element
Selects the parent of an element
E.class
E~F
*
E,F,G
class
id
article
html
Match the CSS Attribute Selector with Its Function
A → 2, B → 5, C → 3, D → 4
A → 2, B → 6, C → 3, D → 4
A → 5, B → 1, C → 3, D → 4
A → 2, B → 1, C → 3, D → 4
ul > li
ul li
ul + li
ul ~ li
:focus
:active
:hover
:visited
#classname
.classname
element.classname
*classname
input.required
input[required]
input(required)
input::required
ID selector
Class selector
Group selector
Universal selector
h1.hover
h1*hover
h1:hover
h1-hover
Universal Selector (*)
Tag Selector
Class Selector
ID Selector
:valid
:required
:optional
:invalid
mouse over
mouse hover
hover
mouse move
:root
:nth-of-type(n)
:only-child
none of the mentioned
:element
:empty
:enabled
None of these
tag
div
Combinator selector
Pseudo Class selector
Pseudo elements selector
Attribute selector
Match the CSS User Action Pseudo-Class with Its Effect
A → 4, B → 3, C → 2, D → 1
A →5, B → 4, C → 3, D → 2
A → 6, B → 2, C → 3, D → 4
A → 5, B → 2, C → 3, D → 6
E[attr^=value]
E[attr$=value]
E[attr*=value]
~
>
+
:target
:selection
::selection
URO
Match the CSS Sub-Selector with Its Meaning
A → 2, B → 1, C → 3, D → 6
:checked
::after
None of the options
Tag > Class > ID
Class > Tag > ID
ID > Class > Tag
Universal > ID > Class
E#id
.class
#id
content p
p.content
.content > p
p .content
Match the CSS Selector with Its Description
A →1, B →5, C → 3, D → 4
A → 2, B → 3, C → 1, D → 4
A → 2, B → 6, C → 4, D → 3
A → 5, B → 3, C → 2, D → 4
both class and tag
.example
#example
element.example
example
[attr]
[attr=""]
[attr=*]
attr[ ]
:nth-child(last)
:last-child
:nth-last-child(1)
type
None of the above
Selects all elements
Selects all siblings after a specified element
Selects only the first sibling of a specified element
Selects only the last sibling of a specified element
Name
ID
Class
Tag
:default
:%
:disabled
input:checked
input:focus
input:hover
input:active
h1 h2 h3
h1+h2+h3
h1,h2,h3
h1>h2>h3
.(dot)
# (hash)
* (asterisk)
@ (at sign)
focus
active
checked
E ~ F