CSS Flashcards

1
Q

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

A

selector, 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

dot 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

simply 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

pound sign (#)

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

Name three different types of values you can use to specify colors in CSS.

A

color name, rgb, hexadecimal

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

What CSS properties make up the box model?

A

margin, padding, border, content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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
8
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
9
Q

What is a pseudo-class?

A

pseudo-class is used to define a special state of an element.

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

Name at least two units of type size in CSS.

A

px, em, rem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
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
12
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
13
Q

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

A

nowrap

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

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

A

static

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

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

A

none unless specified otherwise with offsets top, bottom, left, right

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 where it appears on the page?

A

offsets relative to its initial position

17
Q

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

A

dies and has an outerbody experience - Cody/Brett

18
Q

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

A

moves according to its non-static ancestors position.

trick is to set the most close parent’s position to relative.

19
Q

What are the four box offset properties?

A

top, bottom, right, left

20
Q

The transition property is shorthand for which four CSS properties?

A

transition property duration delay

21
Q

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

A

min/max width

22
Q

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

A

meta name viewport