Professional Documents
Culture Documents
(Download PDF) Principles of Web Design The Web Technologies Series 5th Edition Skalar Test Bank Full Chapter
(Download PDF) Principles of Web Design The Web Technologies Series 5th Edition Skalar Test Bank Full Chapter
https://testbankfan.com/product/principles-of-web-design-the-web-
warrior-series-6th-edition-sklar-solutions-manual/
https://testbankfan.com/product/web-design-introductory-5th-
edition-campbell-test-bank/
https://testbankfan.com/product/javascript-the-web-warrior-
series-6th-edition-vodnik-test-bank/
https://testbankfan.com/product/javascript-the-web-warrior-
series-6th-edition-vodnik-solutions-manual/
Web Design Introductory 5th Edition Campbell Solutions
Manual
https://testbankfan.com/product/web-design-introductory-5th-
edition-campbell-solutions-manual/
https://testbankfan.com/product/web-design-introductory-6th-
edition-campbell-test-bank/
https://testbankfan.com/product/web-design-introductory-6th-
edition-campbell-solutions-manual/
https://testbankfan.com/product/basics-of-web-design-html5-and-
css3-3rd-edition-terry-felke-morris-test-bank/
https://testbankfan.com/product/web-development-and-design-
foundations-with-html5-7th-edition-morris-test-bank/
Chapter 6: Box Properties
TRUE/FALSE
1. Block elements can contain other block elements or inline boxes that contain the element content.
4. CSS lets you specify margin, border, and padding values for all block-level elements.
5. Margins are always transparent, showing the background of their containing element.
7. When the browser collapses the vertical margins between elements, the browser adds the value of the
top element’s bottom margin and the bottom element’s top margin.
10. The default border color is the color of the element content.
MULTIPLE CHOICE
1. The CSS ____ model describes how the element content boxes should be displayed by the browser.
a. visual formatting c. box formatting
b. box d. visual box formatting
ANS: A PTS: 1 REF: 245
2. In HTML, elements fall into ____ primary box types.
a. two c. four
b. three d. five
ANS: A PTS: 1 REF: 245
4. The <body> element is the ____ for the elements of a Web page.
a. content box c. containing box
b. container d. containing block
ANS: C PTS: 1 REF: 246
5. The CSS ____ model describes the rectangular boxes that contain content on a Web page.
a. visual formatting c. box formatting
b. box d. visual box formatting
ANS: B PTS: 1 REF: 248
7. The ____ margins are the top and bottom element margins.
a. spatial c. horizontal
b. vertical d. main
ANS: B PTS: 1 REF: 254
8. If the paragraph element’s margin-top value is 15px and margin-bottom value is 25px, the browser sets
the vertical margin between paragraphs to ____ pixels.
a. 10 c. 25
b. 15 d. 40
ANS: C PTS: 1 REF: 254
12. The ____ border-style keyword creates a three-dimensional border that appears to be engraved into the
page.
a. groove c. ridge
b. double d. inset
ANS: A PTS: 1 REF: 259
13. The ____ border-style keyword creates a three-dimensional border that appears to be embossed.
a. groove c. ridge
b. double d. inset
ANS: C PTS: 1 REF: 259
14. The ____ border-style keyword creates a three-dimensional border that appears to set the entire box
into the page.
a. groove c. ridge
b. outset d. inset
ANS: D PTS: 1 REF: 259
15. If you specify a border style that is not supported, the border defaults to ____.
a. solid c. dashed
b. double d. none
ANS: A PTS: 1 REF: 259
16. With the example “p {border-style: solid double dashed dotted;}”, the bottom
border of a <p> element will be ____.
a. solid c. dashed
b. double d. dotted
ANS: C PTS: 1 REF: 261
17. The ____ property lets you state the width of the border with either a keyword or a length value.
a. border-color c. border-height
b. border-width d. border-style
ANS: B PTS: 1 REF: 262
18. The value of the border-color property can be either a hexadecimal value, RGB value, or one of the
____ predefined color names.
a. 8 c. 16
b. 12 d. 24
ANS: C PTS: 1 REF: 264
21. Which of the following properties lets you state the properties for all four borders of an element?
a. border-overall c. border
b. border-style d. border-width
ANS: C PTS: 1 REF: 266
22. When calculating box model width, the ____ and ____ properties let you determine exactly how wide
or narrow you want the width of a box to be.
a. margin, padding c. width, height
b. min-width, max-width d. border, padding
ANS: B PTS: 1 REF: 271
23. The ____ property lets you position an element to the left or right edge of its parent element.
a. width c. height
b. clear d. float
ANS: D PTS: 1 REF: 272
24. The ____ property lets you control the flow of text around floated elements.
a. clear c. text
b. float d. flow
ANS: A PTS: 1 REF: 275
25. The ____ property lets you add box shadows to an element to create a 3D effect.
a. shadow c. box-shadow
b. drop-shadow d. inset
ANS: C PTS: 1 REF: 278
COMPLETION
1. The visual formatting model is based on the ____________________ structure of the HTML
document and the element display type.
ANS: hierarchical
2. The CSS ____________________ property determines how the browser displays an element.
ANS: display
3. ____________________ values for padding and margins are often specified in fixed page designs
where the dimensions of the layout are consistent.
ANS: Pixel
4. Always use ____________________ measurement values, such as ems or percentages, if you want
your Web pages to adapt to different browser sizes or user-applied font size..
ANS: relative
5. To ensure that the spacing between block-level elements is consistent, the browser
____________________ the vertical margins between elements.
ANS: collapses
6. You can set margin values to ____________________ if you want to remove the default margin
spacing that is built into the browser.
ANS: zero
7. The ____________________ area is between the element content and the border.
ANS: padding
8. The CSS 3 ____________________ property lets you create rounded borders on block-level elements.
ANS: border-radius
9. The ____________________ box properties let you control the dimensions and position of content
boxes.
10. The ____________________ property lets you set the vertical height of an element.
ANS: height
ESSAY
1. What is the CSS visual formatting model and what are the display type categories included in this
model?
ANS:
The CSS visual formatting model describes how the element content boxes should be displayed by the
browser, for example, whether scroll bars appear and how text is wrapped based on the browser
window size. The visual formatting model is based on the hierarchical structure of the HTML
document and the element display type. In HTML, elements fall into two primary box types:
Block: Block-level boxes appear as blocks such as paragraphs. Block elements can contain other block
elements or inline boxes that contain the element content.
Inline: Inline-level boxes contain the content within the block-level elements. They do not form new
blocks of content.
ANS:
CSS box model describes the rectangular boxes that contain content on a Web page. Each block-level
element you create is displayed in the browser window as a box with content. Each content box can
have margins, borders, and padding.
The content box is the innermost box, surrounded by the padding, border, and margin areas. The
padding area has the same background color as the content element, but the margin area is always
transparent. The border separates the padding and margin areas.
3. Briefly describe border properties. What are the available border styles?
ANS:
The border properties let you control the appearance of borders around elements. The border area
resides between the margin and padding. Border properties for each border side let you specify the
style, width, and color of each border. You will likely use the five border shorthand properties, which
include:
border
border-left
border-right
border-top
border-bottom
These shorthand properties let you state border style, border color, and border width for all four
borders or for any of the individual sides of the box. However, you can also state much more specific
borders by using the border properties separately.
The border style is the most important border property because it must be stated to make a border
appear. The border-style property lets you choose from one of the following border-style keywords:
ridge: Three-dimensional border that appears to embossed (or extend outward from the page)
inset: Three-dimensional border that appears to set the entire box into the page
outset: Three-dimensional border that appears to extend the entire box outward from the page
p {border-style: solid;}
Each browser displays the border styles differently. If a border you specify is not supported, the border
defaults to solid.
ANS:
The page layout box properties let you control the dimensions and position of content boxes. There
properties are essential to building CSS page layouts. Using these box properties, you can specify the
exact shape of a content box and create columns and boxes of content. You can set minimum and
maximum heights as well as control how your boxes are resized based on the size of the browser
window. You can also align boxes to the left or right of other elements using the float property and
allow text to wrap around images.
Width: The width property lets you set the horizontal width of an element using either a length value
or a percentage. The percentage value is based on the width of the containing element box. The
following is an example of width property usage:
If you use percentages, the content boxes will adapt to the size of the browser or the containing
element, allowing you to build flexible page layouts based on the browser size. If you are building
fixed dimension layouts, use pixel values for width.
Height: The height property lets you set the vertical height of an element. Height should only be used
in situations where you know the exact height of the element content, such as an image. At other times,
you may need to create a box with specific dimensions for a design. It is a better practice to let the
content determine the height of the element.
The height property accepts either a length value or a percentage. The percentage value is based on the
height of the containing element box. The following is an example of height property usage:
ANS:
Float: The float property lets you position an element to the left or right edge of its parent element.
You can float an image to the left or right of text.
The style rule for the floating image floats the image to the left and adds a margin to offset the text
from the image. The style rule looks like this:
img {
float: left;
margin-right:10px;
}
The float property can also be used to float a content box to the left or right of text. Used with the
width element, you can create a content box.
Clear: The clear property lets you control the flow of text around floated elements. You only use the
clear property when you are using the float property. Use the clear property to force text to appear
beneath a floated element, rather than next to it.
The clear property lets you clear from either left- or right-floating images using the left or right values.
The both value lets you control text flow if you have floating images on both the left and right sides of
the text.
Overflow: The overflow property lets you control when content overflows the content box that
contains it. This can happen when the content is larger than the area it is designed for, especially when
a height property is set for a content element.
To solve this problem, you can add an overflow property to the element. You can choose to show
scroll bars or to hide the overflow content.