HTML and CSS Reference
In-Depth Information
This chapter introduced Cascading Style Sheet rules associated with page layout. Techniques for positioning
and floating elements and configuring two-column page layouts were demonstrated. This topic is very deep
and you have much to explore. Visit the resources in the chapter to continue learning about this technology.
Visit the textbook Web site at for examples, the links listed in this chap-
ter, and updated information.
Key Terms
absolute positioning
clear property
CSS Box Model
descendent selector
display property
float property
left property
normal flow
overflow property
position property
relative positioning
right property
top property
visible width
z-index property
Review Questions
Multiple Choice
1. Which of the following is used to change the
location of an element slightly in relation to
where it would otherwise appear on the page?
a. relative positioning
b. the float property
c. absolute positioning
d. this cannot be done with CSS
4. Which of the following configures a class called
nav to float to the left?
a. . nav { left: float; }
b. . nav { float: left; }
c. . nav { float-left: 200px; }
d. none of the above
5. Which of the following is the rendering flow
used by a browser by default?
a. XHTML flow
b. normal display
c. browser flow
d. normal flow
2. Which of the following, from outermost to inner-
most, are components of the box model?
a. margin, border, padding, content
b. content, padding, border, margin
c. content, margin, padding, border
d. margin, padding, border, content
6. Which of the following is an example of using a
descendent selector to configure the anchor tags
within the .nav class?
a. nav. a
b. a nav.
c. .nav a
d. this cannot be done with CSS
3. Which of the following is the default value of the
border and padding properties for an element?
a. 1 pixel
b. 0 pixels
c. 3 pixels
d. 10 pixels
Search WWH ::

Custom Search