Front-end Web Development

Assignment for Week 2

  1. Follow the steps in Assignment 1, up to where you link a CSS file (or use your work from last week).
  2. Duplicate the <p> element three times. There should be four <p> elements neighboring each other. You can keep the contents of the original <p> or change it around, but keep the <a> element inside them.
  3. Add a class attribute to the first and third <p> tag, with the value style_one.
  4. Add a class attribute to the second <p> tag, with the value style_two.
  5. Add a class attribute to the fourth <p> tag, with the value style_one style_two.
  6. Add a class attribute to the <a> tag within the third <p> element, with the value style_two.
  7. In your CSS file, add a rule that sets the color to green for elements with class style_one.
  8. Add a rule that sets the color to red for elements with a class of style_two.
  9. Add a rule that sets the color to yellow for elements with a class of style_two that are inside elements with a class of style_one.
  10. Add a rule that sets the color to blue for elements that have both classes style_one and style_two.
  11. When you're done...

Extra credit:


Solution