Chapter 9 - Using the Box Properties

REPUBLIC OF NICARAGUA

 

Up

Chapter 9 Review Questions

1.      What are the three space areas in the box model?

Margins, borders, and padding

2.      Which space area is transparent?

Margin area

3.      What does the visual formatting model describe?

The CSS visual formatting model describes how the element content boxes should be displayed by the browser.

4.      What is the visual formatting model based on?

The visual formatting model is based on the hierarchical structure of the HTML document and the element display type.

5.      What are percentage measurement values based on?

The percentage is based on the width of the containing box.

6.      What are the preferred length units for margins and padding?

em

7.      In the following rule, what is the size of the vertical margins between paragraphs?

p {margin-top: 15px; margin-bottom: 10px;}

25px

8.      Where is the padding area located?

The padding area is between the element content and the border.

9.      What are the five most common border properties?

n   border

n   border-left

n   border-right

n   border-top

n   border-bottom

10.  What is the default border style?

None

11.  What is the default border weight?

Medium

12.  What is the default border color?

The default border color is the color of the element content.

13.  What are the two types of color values?

Hexadecimal or RGB

14.  What does the float property let you do?

The float property lets you position an element to the left or right edge of its parent element.

15.  What does the clear element let you do?

The clear property lets you control the flow of text around floated elements.

16.  Write a style rule for a <p> element that sets margins to 2 em, padding to 1 em, and a black, solid 1 pixel border.

p {margin-left: 2em; margin-right: 2em;

   padding-top: 1em;

   padding-bottom: 1em;

   border-top: solid thin;

   border-bottom: solid thin;

}

17.  Write a style rule for an <h1> element that sets top and bottom padding to .5 em with a dashed thin red border on the bottom.

h1 {padding-top: .5em;

    padding-bottom: .5em;

    border-bottom: dashed red;

}

18.  Write a style rule for a <p> element that creates left and right padding of 1 em, a left margin of 30 pixels, and a left black medium double border.

p {margin-left: 30px;

   padding-left: 1em;

   padding-right: 1em;

   border-left: solid medium double;

}

19.  Which two elements are used to create lists in HTML? 

<ul> and <ol>

20.  What are the three types of list styles markers you can specify?

A symbol, a numbering system, or an alphabetical system

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R. Stewart Braswell, Webmaster
Last Updated: 20 April 2012