JavaScript Treehouse Club - MASH MASH - HTML Forms, Divs, and Inputs

Autumn Fisher
PRO
Autumn Fisher
Pro Student 2,165 Points

Your <div> elements need to both have 'class' attributes.? I don't know what I'm doing wrong.

What does its appearance supposed to look like when I make these changes?

1 Answer

So you have two html divs, you can use the same css for both divs if you want them to look exactly the same. That is the point of a class vs id, classes can be applied multiple times yet ids are specific.

<body>
  <h1>First Day of School</h1>

  <form>

    <div class="favorite_stuff">
      <h4>Favorite Foods?</h4>
      <input name="food[]">
      <input name="food[]">
      <input name="food[]">
      <input name="food[]">
    </div>

    <div class="favorite_stuff">
      <h4>Favorite Animals?</h4>
      <input name="animal[]">
      <input name="animal[]">
      <input name="animal[]">
      <input name="animal[]">
    </div>

  </form>

</body>