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:
- Add styles to static HTML pages using CSS
- Explain how CSS allows for separation of display and document structure
- Describe the 3 locations that style rules may be placed and when one location may be preferred over the others: external, document, inline
- Use CSS rules at each of the 3 possible locations
- Describe precedence between CSS rules based on location
- Use basic CSS rule types: font-size, color, font-family, background-color, text-align, etc
- Describe the following simple selector types, and situations in which each is preferred: element, ID, class
- Describe inline and block display; for common elements identify their default display
Key Terminology
What is CSS?
- css
CSS Structure
- rule
- selector
- element selector
- id selector
- class selector