CSS Syntax & CSS Pseudo Classes Flashcards

1
Q

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

A

<b>selector</b>, { <b>declaration</b> } , and declaration is made up of <b>property</b> and a <b>value</b> assigned to the property

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

By using a . followed by the name of the class

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

By using the element name

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

By using # followed by the id name

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

What is a pseudo-class?

A

A keyword added to a selector that specifies a special state of the selected element(s).
“Another way to interact with an element.”

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

What are CSS pseudo-classes useful for?

A

Changes the appearance of elements when a user is interacting with them.
To implement a special case to an element(s).

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