CSS-Syntax Flashcards

1
Q

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

A
  1. Selector
  2. Property name
  3. Property value
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 .name-of-class as your selector and use the class attribute with a value of the class selector name on the html tag.

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 name the css selector after the element tag

i.e p, div, body

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

use the following notation as your selector #name-of-id-selector.

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