Prelims - CSS box model Flashcards

1
Q

is essentially a box that wraps around every HTML element

A

CSS box model

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

Different parts of the box model

A

Content
Padding
Border
Margin

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

The content of the box, where text and images appear

A

Content

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

Clears an area around the content. Is transparent

A

Padding

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

A border that goes around the padding and content

A

Border

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

Clears an area outside the border. Is transparent

A

Margin

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

how to calculate the total width and height of an element?

A

total width
width of content area + (left padding + right padding) + (left border + right border)

total height
height of content are + (top padding + bottom padding) + (top border + bottom border)

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