CSS Syntax Flashcards

1
Q

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

A

The selector and declaration. Within the declaration are the properties and values for the properties

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
Using a period and the value of the class attribute.
ex: .testClass
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 just name the element you are trying to style.

ex: h1, h2, header, p

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 the pound symbol and the value of the id attribute.
ex: #testId

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