Selectors Flashcards

1
Q

When we group selectors, what happens if we place a comma after the last selector?

A

The entire rule gets ignored by the browser

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

Y/N: Is the space between two selectors in a descendant selector considered a combinator?

A

Yes

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

What combinator is used by a child selector?

A

>

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

The adjacent sibling selector uses a _____ as its combinator

A

+

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

What selector uses the tilde (~) as its combinator?

A

General sibling selector

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

What are 3 combinators used in selectors?

A

> , +, ~

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

The :link pseudo-class will only target anchor elements that have what attribute?

A

href

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

The _____ pseudo-class targets an element once it has obtained focus.

A

:focus

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

What pseudo-class targets an element that is being activated by the user?

A

:active

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

What pseudo-class is used to inform the user that a link has already been clicked?

A

:visited

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

The _____ pseudo-class allows us to style links that have not yet been visited.

A

:link

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

li:nth-child(1) {}

A

Selects the li that is the first child of the ul

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

li:nth-last-child(1) {}

A

Targets the li that is the last child of the ul

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

:first-child
:last-child
:only-child

A
  • targets the first, last child

- represents any element which is the only child of its parent

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