In the style sheets we have created, so far, we have used the tag selector, the id selector, the class selector, the descendant combinator, and the :nth-child(n) pseudo class. In this chapter we will review those CSS selectors and show several of the most commonly used ones.

Learning Outcomes for this Chapter

Upon completion of the reading of this chapter and assignments found at the end, a student should be able to:

  • create CSS that includes the tag, id, and class selectors,
  • use combinators to select elements within elements,
  • use the universal selector to select all elements in a page or a combintor expression,
  • create selection rules that use other attributes beyond id or class,
  • use simple pseudo selectors.