Ch5 Flashcards

1
Q

To calculate the height of a box when using the box model, you add the height of the content area to the sum of the heights of the

A

top and bottom borders, top and bottom margins, and top and bottom padding

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

When you set a border for a block element, you can set the color, style, and __________________

A

width

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

If you want to use padding to control the spacing before and after h2 elements, you should start by setting the ____________________________ for those elements to zero.

A

margin

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

By default, if you specify a background image for a block element, it will be _____________________________ both horizontally and vertically so it fills the block element.

A

repeated

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

The code that follows
padding: .5em 0 .25em;
applies this padding to an element:

A

.5em above, 0 left and right, and .25em below

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

The code that follows
border-style: solid none;
means that the box should have

A

solid top and bottom borders

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

By default, the box for a block element is as wide as the _________________ that it’s in.

A

block

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

If you set the background color for the body of a page to blue and you don’t set the background color for a section within the body, the background of the section will be _________________

A

blue

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

If the bottom margin for one element is 1.5 em and the top margin for the element below it is 1 em, how large is the margin between the two elements when the page is rendered in a browser?

A

1.5em

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

In the code that follows
margin: 0 auto;
the auto keyword means

A

to center the element horizontally within the containing block

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