CSS Flashcards

1
Q

What CSS property controls the font used for the text inside an element?

A

font-family

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

What is a pseudo-class?

A

keyword added to a selector that specifies a special state of the selected element

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

What are CSS pseudo-classes useful for?

A

apply a style to an element

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

What CSS properties make up the box model?

A

Content, padding, boarder, margin

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

Which CSS property pushes boxes away from each other?

A

margin

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

Which CSS property add space between a box’s content and its border?

A

padding

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

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

A

property : value;

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

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

A

.className

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

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

A

the corresponding tag name

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

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

A

idName

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

What is the default flex-direction of a flex container?

A

row

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

What is the default flex-wrap of a flex container?

A

wrap

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

Why do two div elements “vertically stack” on one another by default?

A

Because they are block elements (they start start on a new line)

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

What is the default flex-direction of an element with display: flex?

A

row

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

What is the default value for the position property of HTML elements?

A

static (normal flow)

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

How does setting position: relative on an element affect document flow?

A

if set alone (w/out a box offset) then it does not affect the flow

17
Q

How does setting position: relative on an element affect where it appears on the page?

A

It does not have an affect on the page. It acts as if the block is still in it original location

18
Q

How does setting position: absolute on an element affect document flow?

A

It acts as if that element is no longer there

19
Q

How does setting position: absolute on an element affect where it appears on the page?

A

it acts as if it is on a separate top layer

20
Q

How do you constrain an absolutely positioned element to a containing block?

A

Set its parent container to relative position

21
Q

What are the four box offset properties?

A

top, bottom, left, right

22
Q

What does the transform property do?

A

rotate, scale, skew, translate an element to modify its coordinate space of css

23
Q

The transition property is shorthand for which four CSS properties?

A

transition- property, duration, timing-function, delay

24
Q

Give two examples of media features that you can query in an @media rule.

A

max or min width

25
Q

Which HTML meta tag is used in mobile-responsive web pages?

A