CSS Selectors: Student Exercise

1. Element Selector

This paragraph should be dark gray.

2. Class Selector

This paragraph should have a yellow background and be bold.

3. ID Selector

This text should be green and italic.

4. Descendant Selector

This is a paragraph inside a div. This span should be red.

5. Child Selector

6. Grouping Selector

This paragraph and the heading above should be teal.

7. Pseudo-class: :first-child

8. Pseudo-class: :hover

Hover over this link — it should turn orange.

9. Attribute Selector

10. Universal Selector

All elements should have box-sizing: border-box applied.