Frontend Web Development

Assignment for Week 3

  1. Follow the steps in Assignment 1 (or use your work from last week).
  2. Change the <p> element to a <div> element.
  3. Duplicate the <div> element.
  4. Add a class attribute to the first <div> tag, with the value box_one.
  5. Add a class attribute to the second <div> tag, with the value box_two.
  6. Add a CSS declaration that makes elements with either class box_one or box_two have a width and height of 200px, and a color of white.
  7. Add a CSS declaration that gets rid of the default spacing that is built-in to every document.
  8. Add a CSS declaration that gives elements with a class of box_one a red background.
  9. Add a CSS declaration that gives elements with a class of box_two a blue background.
  10. Modify a single existing declaration such that the page looks exactly like this (text content can be different). The second box is 20px from the top and left of the first box:

Extra credit:


Solution