Selectors

Chapter 2

Figures

  1. Simple styling of a simple document
  2. Moving a style from one element to another
  3. Grouping both selectors and rules
  4. The result of equivalent style sheets
  5. Using a class selector
  6. Using generic and specific selectors to combine styles
  7. Selecting elements with multiple class names
  8. Selecting elements based on their attributes
  9. Selecting elements based on attributes and their values
  10. Selecting elements based on portions of attribute values
  11. Selecting elements based on substrings within attribute values
  12. Selecting elements based on substrings that begin attribute values
  13. Selecting elements based on substrings that end attribute values
  14. A document tree structure
  15. Selecting an element based on its context
  16. A very specific descendant selector
  17. Using descendant selectors to apply different styles to the same type of element
  18. A document tree fragment
  19. Another document tree fragment
  20. Selecting adjacent siblings
  21. Selecting following siblings