Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

I need help.

I entered the text on this question as it appears in the hint, and it did not take it. Please show me where I was in error, and why.

index.html
<body>
  <h1>First Day of School</h1>

  <form>

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

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

  </form>

</body>

6 Answers

Michele Smiraglia
Michele Smiraglia
6,509 Points

div class="favorite_stuff"

at the both div tags.

Joy Kesten
STAFF
Joy Kesten
Treehouse Guest Teacher

Yup, Michele Smiraglia is giving you good advice. It's asking you to prepare the HTML for the CSS you'll add later, "We want the same CSS style to apply to both <div> elements."

You'll need to edit BOTH div elements, "Give both <div> elements the class of "favorite_stuff"."

The hint kind of gives it away:

<div class="favorite_stuff">

It keeps saying that I need to add class elements-I guess I am not doing that. Specifically, how do I do that?

Joy Kesten
Joy Kesten
Treehouse Guest Teacher
<div class="favorite_stuff">

copy and paste this into the opening div tags and you should be good to go. Best of luck!

Michele Smiraglia
Michele Smiraglia
6,509 Points

yeah Joy Kesten :

<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>

see at the two div elements?

Thanks for your help. I am such a nube that I thought that the <h4> was the correct place to put it.

Joy Kesten
Joy Kesten
Treehouse Guest Teacher

no worries, that's what we're here for! Also, I edited your comment so the <h4> would show up. Click 'edit answer' from the ... menu to see how to do it. Or watch the "Tips for asking questions" video to see how. Thanks for learning!

You are always so peppy! Is that natural, or are you over caffeinated or something? LOL Thanks for the help.