Chapter 21: Styling the Web With CSS

Learning Objectives

Upon completing all the content in this chapter, you should be able to do the following:

  1. Add styles to static HTML pages using CSS
  2. Explain how CSS allows for separation of display and document structure
  3. Describe the 3 locations that style rules may be placed and when one location may be preferred over the others: external, document, inline
  4. Use CSS rules at each of the 3 possible locations
  5. Describe precedence between CSS rules based on location
  6. Use basic CSS rule types: font-size, color, font-family, background-color, text-align, etc
  7. Describe the following simple selector types, and situations in which each is preferred: element, ID, class
  8. Describe inline and block display; for common elements identify their default display

Key Terminology

What is CSS?

  1. css

CSS Structure

  1. rule
  2. selector
  3. element selector
  4. id selector
  5. class selector