selectors Flashcards

1
Q

.class

A

Selects all elements with class=”intro”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

id

A

Selects the element with id=”firstname”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

*

A

Selects all elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

element

A

Selects all < > elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

element,element

A

Selects all <> elements and all <> elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

element element

A

Selects all <> elements inside <> elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

element>element

A

Selects all <> elements where the parent is a <> element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

element+element

A

Selects all <> elements that are placed immediately after <> elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

element1~element2

A

Selects every <> element that are preceded by a <> element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

[attribute]

A

Selects all elements with a target attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

[attribute=value]

A

Selects all elements with —– =”_blank”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

[attribute~=value]

A

Selects all elements with a title attribute containing the word “ —– “

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

[attribute|=value]

A

Selects all elements with a lang attribute value starting with “—–”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

[attribute^=value]

A

Selects every element whose —- attribute value begins with “—-“

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

[attribute$=value]

A

Selects every element whose —- attribute value ends with “——”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

[attribute*=value]

A

Selects every element whose —— attribute value contains the substring “———”

17
Q

:active

A

Selects the active link

18
Q

::after

A

Insert something after the content of each element

19
Q

::before

A

Insert something before the content of each element

20
Q

:checked

A

Selects every checked < —- > element

21
Q

:default

A

Selects the default element

22
Q

:disabled

A

Selects every disabled element

23
Q

:empty

A

Selects every element that has no children (including text nodes)

24
Q

:enabled

A

Selects every enabled element

25
Q

:first-child

A

Selects every element that is the first child of its parent

26
Q

::first-letter

A

Selects the first letter of every element

27
Q

::first-line

A

Selects the first line of every element

28
Q

:first-of-type

A

Selects every element that is the first element of its parent

29
Q

:focus

A

Selects the input element which has focus

30
Q

:hover

A

Selects links on mouse over