20 questions
In the box model for an element, the border
is outside the margin
is between the padding and the margin
is inside the padding
is outside the content
By default, the element in the box model is
as tall as the block that contains it
as wide as it needs to be for its contents
as tall as it needs to be for its contents
as wide as any inline element that contains it
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
top and bottom margins and top and bottom padding
top and bottom borders, top and bottom margins, and top and bottom padding
top and bottom borders, top margin, and bottom margin
top and bottom borders, top padding, and bottom padding
You use a reset selector to
set the margins and padding for all elements to zero
set inherited properties to their default values
set the font size for all text elements to their defaults
set the font family for all elements
In the code that follows
margin: 0 auto;
the auto keyword means
to automatically adjust the margins for the element whenever necessary
to center the element horizontally within the containing block
to center the element vertically within the containing block
to automatically align the element based on the size of the browser window
The code that follows
padding: .5em 0 .25em;
applies this padding to an element:
5em above, 0 left, and .25em below
.5em above, 0 left and right, and .25em below
.5em above, 0 right, and .25em below
.5em above and below, 0 right, and .25em left
The code that follows
border-style: solid none;
means that the box should have
a solid top border
solid top and bottom borders
solid borders on all four sides
solid borders on all four sides
If you use a reset selector for a page, you need to set
the margins for all of the elements of the page
the margins and padding for all the elements of the page
all of the box model properties for all the elements of the page
the height and width for all the elements of the page
When you set the border for a block element, you can set
the color and width
the color and style
the width and style
the color, style, and width
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
blue
white
the background color that’s set for the html element
the browser default color
By default, if you specify a background image for a block element, the image will be
aligned in the upper left corner of the element
in the center of the element
repeated horizontally across the element
repeated horizontally and vertically so it fills the element
Which of the following formatting can you NOT apply to boxes using CSS3?
rounded corners
linear gradients
radial gradients
shadows
Which CSS snippet would set the border radius for a section element as shown in this screenshot?
border-radius: 20px 10px 20px 0;
border-radius: 0 20px 10px 20px;
border-radius: 20px 0 20px 10px;
border-radius: 10px 20px 0 20px;
Which CSS snippet would set the border shadows for a section element as shown in this screenshot?
box-shadow: 3px 3px 4px 4px red;
box-shadow: 3px 4px 3px 4px red;
box-shadow: 4px 4px 3px 3px red;
box-shadow: 4px 3px 4px 3px red;
If the bottom margin for one element is 1.5em and the top margin for the element below it is 1em, how large is the margin between the two elements when the page is rendered in a browser?
.5em
1.0em
1.5em
2.5em
To calculate the width of a box when using the box model, you add the width of the content area to the sum of the widths of the
top and bottom margins and top and bottom padding
top and bottom borders, top padding, and bottom padding
top and bottom borders, top margin, and bottom margin
left and right borders, left and right margins, and left and right padding
If the bottom margin for one element is 1em and the top margin for the element below it is 3em, how large is the margin between the two elements when the page is rendered in a browser?
3em
1.0em
1.5em
2.5em
The page layout is called a ________ when the size of the page won’t change if the user changes the size of the browser window.
Fixed Layout
Floating Layout
Fluid Layout
Adjustable Layout
The shorthand property to set the top and bottom margins to 1em, the right and left margins to 2em is
margin-top: 1em;
margin-bottom: 1em;
margin-right: 2em;
margin-left: 2em;
margin: 1em 2em;
margin-top, margin-bottom: 1em;
margin-left, margin-right: 2em;
margin: 1em auto 2em;
A __________ gradient is one in which the colors transition from the starting hue to end in a straight line
radial
diamond
linear
angle