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 trialLauren King
Courses Plus Student 1,044 Pointsdigitally illiterate? I don't see my error in this super easy code code challenge (MASH)
Does anyone see where I have messed up this code challenge? I am going nuts. The syntax seems correct in both div elements, but I keep getting an error. I have been working on the digital literacy track for three days and I was feeling pretty good until I spent over an hour trying to make this work to no avail. THANK YOU
My thoughts on possible solutions: Do I need to change anything with the closing form or body tags?
<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>
2 Answers
Jennifer Nordell
Treehouse TeacherFirst off, hang in there! You've got this! Secondly, there's nothing wrong with your body and form tags. Those are just fine. It's a little hard to say here what you've tried so far that's failed. As far as I can see, the code posted here is the same as the code when the challenge first begins.
So I'm going to show you how one div is done, and I'm going to leave the second div up to you
<div class="favorite_stuff">
<h4>Favorite Foods?</h4>
<input name="food[]" type="text">
<input name="food[]" type="text">
<input name="food[]" type="text">
<input name="food[]" type="text">
</div>
Now, see if you can put together the second div! Note: all your coding will go in the divs. Good luck!
Lauren King
Courses Plus Student 1,044 PointsJennifer- thank you for coming to my rescue so very quickly!
I was working on this challenge on my tablet, but I asked my question from my computer, which definitely did post code from when the challenge first begins. Thanks for helping me, even though I didn't give you anything to go on.
Turns out, I didn't realize my class syntax needed to be inside the opening div tag. Your answer gave me everything I needed! You've given me great confidence in the forum.