CSS-syntax-Q&A Flashcards

1
Q

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

A

A CSS rule contains two parts:

a selector and a declaration.

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

Matches an element whose class attribute has a value that matches the one specified after the period (or full stop) symbol.

’ . classname ‘

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

Matches element names

’ 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

Matches an element whose id attribute has a value that matches the one specified after the pound or hash symbol.

’ # idname ‘

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