Skip To Content

Athabasca University

Section 1.4 CSS Basics

Learning Objectives

After you have completed this section, you should be able to

  • define cascading style sheets.
  • use cascading style sheets to control the appearance of a website, so as to give all the pages of a website the same look and feel.

Activities

  • Carefully read the learning objectives.
  • Watch the presentation for the section;
  • Read Chapter 4, Introduction to Cascading Style SheetsTM (CSS): Part 1, of the e-text.
  • Read relevant documents you find at https://www.w3schools.com/css/default.asp.
  • Find answers to the study questions below.
  • Do exercises 4.3, 4.5, and 4.8 in Chapter 4 of the e-text.

Study Questions

  1. What are inline styles?
  2. Where do you declare an inline style, and how?
  3. What are embedded style sheets?
  4. Where should an embedded style sheet be embedded in an HTML5 document? How?
  5. What is the format of the CSS rules for the style sheets?
  6. What is a style class?
  7. How do you use a defined style class in your HTML5 document?
  8. What are conflicting styles?
  9. What rules are set to resolve conflicting styles?
  10. How do you use an external style sheet in a HTML5 document?
  11. How do you validate your cascading style sheets?
  12. What is the positioning property provided by CSS?
  13. What is absolute positioning?
  14. How do you use the absolute positioning property in an inline style sheet to control the position of an HTML5 element?
  15. What is relative positioning?
  16. How do you define relative positioning in embedded style sheets and use them in your HTML5 documents?
  17. When should relative positioning be used in an HTML5 document?
  18. How can you use CSS to control the background of HTML5 elements?
  19. How do you control the dimensions of elements using CSS?
  20. What is text flow?
  21. What is the box model?
  22. How do you control text flow in HTML5 documents using CSS?
  23. What are the margins, borders, and padding of a box model?
  24. What border styles can a box model have?
  25. What are author styles?
  26. What are user styles?
  27. Where are user style sheets set?
  28. When a conflict between user style and author style occurs, what rules are set to solve such conflicts?

Review

Do the self-review exercises in Chapter 4 of the e-text.

Summary

Read the Chapter 4 summary.

Updated May 06 2022 by FST Course Production Staff