ITP CSS Selectors Flashcards

1
Q

These are examples of ______.

p 
.card
a:hover
ul li
A

Selectors

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

Between the curly braces is called…

.card {
color: #ff0000;
font-weight: bold;
}
A

declaration block

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

When you see these in a CSS declaration block, these are…

color
background-color
font-weight
text-decoration
A

Properties

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

When you see these in a CSS declaration block, these are…

#ff0000
bold
none
underline
3px solid #00cc00
A

Values

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

What does a selector do?

A

Applies some styles based on a HTML pattern

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

What kind of selector is this?

ul

A

Type or element selector

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

What kind of selector is this?

.card p

A

Descendent selector

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

What kind of selector is this?

.warning

A

Class selector

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

Read this selector out loud:

li

A

For all list items

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

Read this selector out loud:

.featured
A

For any element with a class of featured

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

Read this selector out loud:

ul li a

A

For all links descended from a list item descended from an unordered list

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

Read this selector out loud:

h1 span .smaller

A

For all elements with a class of smaller descended from a span descended from an H1

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

Read this selector out loud:

h1 span.smaller

A

For all spans with a class of smaller descended from an h1

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

Read this selector out loud:

p a:hover

A

For all links in a hover state descended from a paragraph

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

Read this selector out loud:

p a :hover

A

For any element in a hover state descended from an a element descended from a paragraph

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

Read this selector out loud:

a.warning:hover

A

For all links with a class of warning in a hover state

17
Q

Read this selector out loud:

div.card.card3

A

For all divs with a class of card and a class of card3

18
Q

Read this selector out loud:

div .card.card3

A

For any element with a class of card and a class of card3 descended from a div

19
Q

Read this selector out loud:

div .card .card3

A

For any element with a class of card3 descended from any element with a class of card descended from any div

20
Q

Read this selector out loud:

div.card .card3

A

For any element with a class of card3 descended from a div with a class of card