Module 04-02 CSS Selectors & The Box Model Flashcards

1
Q

What kind of elements take up the entire width of a line?

A

block elements

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

What kind of elements appear one beside another?

A

inline elements

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

What kind of elements appear one beside another but can have their height and width set?

A

inline-block elements

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

What is the space inside an element, between its content and border?

A

Padding

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

What is the edge of an element?

A

Border

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

What is the space outside of an element, between the element and other elements?

A

Margin

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

How is an elements space calculated?

A

Adding content + padding + border + margin

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

How do you denote a class selector?

A

period before the class name (i.e. .notice { } )

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

How do you denote an ID selector?

A

hashtag before the ID name (i.e. #info { } )

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

What is the universal selector that denotes defaults for a page?

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

How do you denote an attribute selector?

A

attribute in brackets after type (i.e. input[type] or input[type=text])

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

How do you denote a pseudo-class selector?

A

color after the type (i.e. a:hover or input:enabled, etc.)

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

How is a Combo Combinator used?

A

Selectors are strung together (i.e. button[type=submit).danger for buttons of type submit that have a class of danger)

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

How is a Multiple Combinator used?

A

Multiple elements separated by commas (i.e. button, input[type-checkbox], select)

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

How is a Descendant Combinator used?

A

Element inside another separated by space (i.e. div.aside p for any p within a div with class aside)

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

How is a Child Combinator used?

A

Elements separated by > (i.e. div.aside > p for any p that is a direct descendent of a div with class aside)

17
Q

What is the default value for position?

A

static

18
Q

Which position value offsets the element from its normal location?

A

relative, then used with at least one: top, bottom, right, left value to move that many pixels in that direction

19
Q

Which position value lets you take an element out of the normal flow and place it wherever you want?

A

fixed, then used with at least one: top, bottom, right, left value to move that many pixels away from those edges (like sticking it to the glass above a piece of paper)

20
Q

Which position value lets you take the element out of the normal flow and place it wherever you want within a parent element?

A

absolute, then used with at least one: top, bottom, right, left value to move that many pixels away from those edges (like sticking it to a piece of paper under glass)

21
Q

What length units are fixed to a physical length and generally considered to always be the same size?

A

Absolute (px)

22
Q

What length units aren’t fixed and change depending on the context?

A

Relative (i.e. em - relative to the font size of the parent element or rem - relative to the font size of the root element or percentage - relative to the same measurement of the parent element

23
Q

What is specificity?

A

Special rules that tell a browser what rules should apply to what elements - in the order they’re given (last takes precedence, aka cascading) - and with regards to the more specific a rule is, the higher its priority

24
Q

Order the three selectors from least to most specific

A

Type, Class, ID