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
Dare Adelugba
6,563 PointsError saying "button must be placed between form tags"
What is the error here?
<form action="index.html" method="post">
<input type="text" id="name" name="user_name">
<textarea id="comment" name="user_comment">
<button type="submit">Submit Comment</button> </form> </body> </html>
john larson
16,594 PointsJennifer to the rescue :D
Jennifer Nordell
Treehouse TeacherWhen I can
7 Answers
Jennifer Nordell
Treehouse TeacherHi there Dare Adelugba! The problem isn't actually with the button, it's with the textarea element. This particular element requires a closing tag. This is specified by the MDN documentation.
So change this line with the textarea to this:
<textarea id="comment" name="user_comment"></textarea>
Hope this helps!
john larson
16,594 PointsWas this a challenge question? If so link to that challenge or copy and paste the exact question. That could help trouble shoot it.
Dare Adelugba
6,563 Pointsjohn larson
16,594 PointsI don't see any difference in mine and yours, but this passed for me
<form action="index.html" method="post">
<input type="text" id="name" name="user_name">
<textarea id="comment" name="user_comment"></textarea>
<button type="submit">Submit Comment</button>
</form>
Dare Adelugba
6,563 PointsThis beats me. I've stuck on this for hours because it kept rejecting my answers. I am not happy that it will add to my total challenges even though this is a a bug error.
Dare Adelugba
6,563 PointsThank you Jennifer it helps, instantly. This is unreal that I couldn't notice this for hours.
Jennifer Nordell
Treehouse TeacherYou're quite welcome! And don't worry, it happens to all of us. We sit there and look at it and look at it and someone else says "Oh you're missing a comma here". It's always nice with a second pair of eyes. That being said, the reason it was giving the button error is because it couldn't add the button to the form without you first closing the textarea. And while it may seem misleading, it was accurate.
Dare Adelugba
6,563 PointsYou're the best! Thanks for taking the time for this. I am enjoying these tutorials.
john larson
16,594 Pointsjohn larson
16,594 Points