css-syntax Flashcards

1
Q

What are the names of the individual pieces of a CSS rule?

A

selector and declaration block

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

In CSS, how do you select elements by their class attribute?

A

you use the dot and then whatever the name of the class; example: .title will select any element with class “title.”

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

In CSS, how do you select elements by their type?

A

you would just input the name of the element

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

In CSS, how do you select an element by its id attribute?

A

you would use # and then the value/name of the id attribute; example: #about will select all elements with ID “about”

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