Principles of Web Design The Web Technologies Series 5th Edition by Joel Sklar Test Bank
Principles of Web Design The Web Technologies Series 5th Edition by Joel Sklar Test Bank
Description
WITH ANSWERS
Principles of Web Design The Web Technologies Series 5th Edition by Joel Sklar Test Bank
Chapter 6: Box Properties
TRUE/FALSE
- Block elements can contain other block elements or inline boxes that contain the element content.
ANS: T PTS: 1 REF: 245
- Inline-level elements form new blocks of content.
ANS: F PTS: 1 REF: 245
- Parent elements contain child elements.
ANS: T PTS: 1 REF: 246
- CSS lets you specify margin, border, and padding values for all block-level elements.
ANS: T PTS: 1 REF: 246
- Margins are always transparent, showing the background of their containing element.
ANS: T PTS: 1 REF: 251
- Increasing the margins does not enhance the legibility of text.
ANS: F PTS: 1 REF: 252
- When the browser collapses the vertical margins between elements, the browser adds the value of the top elements bottom margin and the bottom elements top margin.
ANS: F PTS: 1 REF: 254
- The border-style property must be stated to make a border appear.
ANS: T PTS: 1 REF: 259
- Percentages are not allowed when using the border-width property.
ANS: T PTS: 1 REF: 262
- The default border color is the color of the element content.
ANS: T PTS: 1 REF: 265
MULTIPLE CHOICE
- 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
- In HTML, elements fall into ____ primary box types.
a. | two | c. | four |
b. | three | d. | five |
ANS: A PTS: 1 REF: 245
- ____ elements appear as blocks such as paragraphs.
a. | Inline-level | c. | List-item |
b. | Page-level | d. | Block-level |
ANS: D PTS: 1 REF: 245
- The 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
- 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
- You can set ____ margin values to achieve special effects.
a. | zero | c. | negative |
b. | positive | d. | individual |
ANS: C PTS: 1 REF: 253
- The ____ margins are the top and bottom element margins.
a. | spatial | c. | horizontal |
b. | vertical | d. | main |
ANS: B PTS: 1 REF: 254
- If the paragraph elements 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
- The ____ is between the element content and the border.
a. | unused area | c. | margin |
b. | padding area | d. | dead space |
ANS: B PTS: 1 REF: 255
- The padding area inherits the ____ of the element.
a. | foreground color | c. | background color |
b. | margin area | d. | margin color |
ANS: C PTS: 1 REF: 255
- The ____ is the most important border property.
a. | border-color | c. | border-width |
b. | border-characteristics | d. | border-style |
ANS: D PTS: 1 REF: 259
- 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
- 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
- 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
- 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
- With the example p {border-style: solid double dashed dotted;}, the bottom border of a
element will be ____.
a. | solid | c. | dashed |
b. | double | d. | dotted |
ANS: C PTS: 1 REF: 261
- 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
- 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
- Which of the following is a predefined color name?
a. | Cyan | c. | Purple |
b. | Magenta | d. | Orange |
ANS: C PTS: 1 REF: 264
- Using the example p {border-color: black red green;}, the bottom border of a
element will be ____.
a. | black | c. | green |
b. | red | d. | transparent |
ANS: C PTS: 1 REF: 266
- 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
- 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
- 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
- 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
- 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
- The visual formatting model is based on the ____________________ structure of the HTML document and the element display type.
ANS: hierarchical
PTS: 1 REF: 245
- The CSS ____________________ property determines how the browser displays an element.
ANS: display
PTS: 1 REF: 247
- ____________________ values for padding and margins are often specified in fixed page designs where the dimensions of the layout are consistent.
ANS: Pixel
PTS: 1 REF: 251
- 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
PTS: 1 REF: 251
- To ensure that the spacing between block-level elements is consistent, the browser ____________________ the vertical margins between elements.
ANS: collapses
PTS: 1 REF: 254
- You can set margin values to ____________________ if you want to remove the default margin spacing that is built into the browser.
ANS: zero
PTS: 1 REF: 254
- The ____________________ area is between the element content and the border.
ANS: padding
PTS: 1 REF: 255
- The CSS 3 ____________________ property lets you create rounded borders on block-level elements.
ANS: border-radius
PTS: 1 REF: 267
- The ____________________ box properties let you control the dimensions and position of content boxes.
ANS: page layout
PTS: 1 REF: 268
- The ____________________ property lets you set the vertical height of an element.
ANS: height
PTS: 1 REF: 272
ESSAY
- 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.
PTS: 1 REF: 245
- What is the CSS box model?
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.
PTS: 1 REF: 248
- 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:
none: No border on the element; this is the default setting
dotted: Dotted border
dashed: Dashed border
solid: Solid line border
double: Double line border
dot-dash: Alternating dots and dashes (CSS3 value)
dot-dot-dash: Two dots and a dash (CSS3 value)
wavy: Wavy line border (CSS3 value)
groove: Three-dimensional border that appears to be engraved into the page
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
The following code shows an example of the border-style property in use:
p {border-style: solid;}
Each browser displays the border styles differently. If a border you specify is not supported, the border defaults to solid.
PTS: 1 REF: 258-259
- Describe the width and height page layout box properties.
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:
div {width: 200px;}
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:
div {height: 150px;}
PTS: 1 REF: 268-269 | 272
- Describe the float, clear, and overflow properties.
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.
PTS: 1 REF: 272-273 | 275-277
Chapter 7: Page Layouts
TRUE/FALSE
- In a standard HTML document, the default position of elements is generally top to bottom and left to right.
ANS: T PTS: 1 REF: 294
- In the normal flow for block-level elements, boxes are laid out horizontally once after the other, beginning at the left of the containing block.
ANS: F PTS: 1 REF: 294
- When you start to use floats to build page layouts, the behavior of floats can cause problems.
ANS: T PTS: 1 REF: 296
- Divisions cannot be nested within divisions.
ANS: F PTS: 1 REF: 297
- A typical Web page design can contain both floating and nonfloating elements.
ANS: T PTS: 1 REF: 298
- Floating elements must always have a specified width or they will expand to the size of the browser window.
ANS: T PTS: 1 REF: 299
- Floats are designed to stay inside of their containing element.
ANS: F PTS: 1 REF: 299
- If you have multiple columns, at least one needs to be nonfloating and positioned with margin properties.
ANS: T PTS: 1 REF: 300
- Using floating elements limits the variety of options you can use for page layouts.
ANS: F PTS: 1 REF: 303
- When you are floating an element within another element, the order of the elements is important.
ANS: T PTS: 1 REF: 303
MULTIPLE CHOICE
- In the past, Web designers used ____ to create multiple column layouts and gain more control of their page designs.
a. | blocks | c. | grids |
b. | tables | d. | CSS |
ANS: B PTS: 1 REF: 294
- Modern Web designs are built using the ____ layout capabilities.
a. | block | c. | grid |
b. | table | d. | CSS |
ANS: D PTS: 1 REF: 294
- You can use ____ to position content elements on a Web page and move them out of the normal flow of elements.
a. | clears | c. | tables |
b. | floats | d. | blocks |
ANS: B PTS: 1 REF: 294
- The space between boxes in the normal flow is determined by the ____ settings.
a. | margin | c. | body |
b. | padding | d. | wrapper |
ANS: A PTS: 1 REF: 294
- The ____ element is the containing element for the content section of the Web page.
a. | c. | ||
b. | d. |
ANS: D PTS: 1 REF: 295
- The elements within the ____ element are displayed exactly in the order they appearing the code from top to bottom, unless they are floated or have a display type of inline.
a. | c. | ||
b. | d. |
ANS: D PTS: 1 REF: 295
- The ____ element is the primary tool for creating sections of content in a Web page design.
a. | division | c. | span |
b. | section | d. | paragraph |
ANS: A PTS: 1 REF: 296
- Using the ____ properties, you can create divisions that are any shape you need to contain and segregate sections of content.
a. | box | c. | float |
b. | special | d. | clear |
ANS: A PTS: 1 REF: 296-297
- The ____ property lets you build columnar layouts by floating content elements to either the right or left side of the browser window.
a. | column | c. | clear |
b. | float | d. | paragraph |
ANS: B PTS: 1 REF: 298
- Page elements can be separated from each other with ____ settings to provide gutters between columns.
a. | margin | c. | clear |
b. | float | d. | overflow |
ANS: A PTS: 1 REF: 298
- The original concept of floating was to allow ____.
a. | elements to fall below each other |
b. | a footer to span across three columns |
c. | text to wrap around images |
d. | a three column layout |
ANS: C PTS: 1 REF: 299
- When you start to build floating layouts, you will often see that the ____ elements extend beyond their containing elements, which will result in a broken layout.
a. | floating | c. | column |
b. | cleared | d. | paragraph |
ANS: A PTS: 1 REF: 299
- In a three-column layout, if you use a nonfloating footer element, with the clear property set to ____, the containing wrapper will extend to contain all elements.
a. | left | c. | right |
b. | both | d. | none |
ANS: B PTS: 1 REF: 302
- Because some type of footer is a consistent design feature in most Web sites, in a three column layout using the ____ property on the footer works very well.
a. | layout | c. | padding |
b. | clear | d. | margin |
ANS: B PTS: 1 REF: 302-303
- In float-based layouts, the ____ property can help you solve the problem of floats not appearing where you want them to appear.
a. | wrapper | c. | overflow |
b. | clear | d. | padding |
ANS: B PTS: 1 REF: 306
- ____ layouts are sometimes known as liquid layouts.
a. | Fixed | c. | Flexible |
b. | Pixel | d. | Inch |
ANS: C PTS: 1 REF: 307
- ____ layouts shift as the user resizes the window, wrapping text or adding white space as necessary.
a. | Fixed | c. | Flexible |
b. | Pixel | d. | Inch |
ANS: C PTS: 1 REF: 307
- You normally want to avoid using ____ on elements that contain varying lengths of content.
a. | width | c. | max-width |
b. | height | d. | clear |
ANS: B PTS: 1 REF: 308
- With a simple layout, ____ Web sites resize gracefully, but with more complex content and page designs, you want to restrict your design with the min-width and max-width properties.
a. | fixed | c. | flexible |
b. | pixel | d. | inch |
ANS: C PTS: 1 REF: 308
- You can control the compression and expansion of your content in a ____ layout by setting minimum and maximum widths for your content.
a. | fixed | c. | grid |
b. | pixel | d. | flexible |
ANS: D PTS: 1 REF: 310
- Many designers prefer ____ layouts because they have more control over the finished design.
a. | fixed | c. | flexible |
b. | em | d. | percentage |
ANS: A PTS: 1 REF: 316
- In a(n) ____ layout, designers can build more complex layouts because they can be fairly sure of consistent results.
a. | fixed | c. | flexible |
b. | em | d. | percentage |
ANS: A PTS: 1 REF: 316
- Fixed layouts are normally contained by a ____ element that controls the page width and centers the page in the browser window.
a. | clear | c. | floating |
b. | wrapper | d. | static |
ANS: B PTS: 1 REF: 316
- ____ measurements are favored by many designers when creating fixed designs.
a. | Percentage | c. | Em |
b. | Ex | d. | Pixel |
ANS: D PTS: 1 REF: 316
- Automatic centering is a simple use of the ____ property.
a. | centering | c. | padding |
b. | floating | d. | margin |
ANS: D PTS: 1 REF: 318
COMPLETION
- The ____________________ of elements determines the sequence of element display in standard HTML.
ANS: normal flow
PTS: 1 REF: 294
- When you ____________________, or position an element, you take it out of the normal flow.
ANS: float
PTS: 1 REF: 295
- You can create a division element to contain an entire Web page, often called a(n) ___________________.
ANS: wrapper
PTS: 1 REF: 297
- Building ____________________ layouts requires that you choose a method for containing the floating elements.
ANS: floating
PTS: 1 REF: 299
- The original concept of ___________________ was to allow text to wrap around images.
ANS: floating
PTS: 1 REF: 299
- ____________________ occur when the total width of the columnar elements in a page layout exceeds the width of their containing element.
ANS: Column drops
PTS: 1 REF: 305
- The ____________________ of a box element includes the total of its width value plus any left or right padding, border, and margins.
ANS: width
PTS: 1 REF: 305
- _____________________ adapt to the size of the browser window.
ANS: Flexible layouts
PTS: 1 REF: 307
- ____________________ remain constant despite the resizing of the browser in different screen resolutions and monitor sizes.
ANS: Fixed layout
PTS: 1 REF: 316
- Another benefit of using a wrapper division to contain your layout is the ability to automatically ____________________ the layout horizontally in the browser.
ANS: center
PTS: 1 REF: 318
ESSAY
- Describe the normal flow of elements and how floating elements affect it.
ANS:
By default, the browser normally displays elements on the page one after the other, depending on whether the elements are block-level or inline elements. Some elements float to the left or right of other elements on the page. Element position can be affected by margin or padding properties, but generally the browser lays out element boxes from top to bottom and left to right until all elements that make up the Web page have been displayed.
In the normal flow for block-level elements, boxes are laid out vertically one after the other, beginning at the top of the containing block. Each box horizontally fills the browser window. The space between boxes is determined by the margin settings. The normal flow determines the sequence of element display in standard HTML.
When you float, or position an element, you take it out of the normal flow. Other elements that are not floated or positioned will still follow the normal flow, so you should check the results frequently as you are designing you layout using floats.
PTS: 1 REF: 294-295
- Explain how you can use the division element to create content containers.
ANS:
The division element is your primary tool for creating sections of content in your Web page designs. Using the box properties, you can create divisions that are any shape you need to contain and segregate sections of content. You can create vertical columns containing content and control the white space between and within columns. You can nest divisions within divisions and create interesting content presentations. Finally, you can create a division element to contain an entire Web page, often called a wrapper, to center a Web page within the browser window, regardless of screen resolution.
PTS: 1 REF: 296-297
- Describe the advantages and disadvantages of flexible layouts.
ANS:
Flexible layouts offer the advantage of adapting to the users browser size. From a design viewpoint, this can be less desirable because of the wide range of monitor sizes and resolutions. With a flexible layout, your content has to adapt and look food at wide rang of layout sizes, which can be difficult to achieve. With a simple layout, flexible Web sites resize gracefully, but with more complex content and page designs, you may want to restrict your design with the min-width and max-width properties.
PTS: 1 REF: 308
- Describe some of the advantages of a fixed page layout.
ANS:
Fixed layouts remain constant despite the resizing of the browser in different screen resolutions and monitor sizes. Many designers prefer fixed layouts because they have more control over the finished design. They can also build more complex layouts because they can be fairly sure of consistent results. Fixed layouts are normally contained by a wrapper element that controls the page width and centers the page in a browser window. Within the wrapper, you can choose whether to contain only fixed-size elements, percentage elements, or a combination of the two. Because the outside width of the page is fixed, the design is more precise, and content can flow down the page as necessa
Write a review
Your Name:Your Review: Note: HTML is not translated!
Rating: Bad Good
Enter the code in the box below: