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 trialFrancesco Vittorio Beninato
3,624 PointsChallenge task 4 of 5 After the textarea, create a button element. Between the button
This was my answer, why is not working? any help?
<!DOCTYPE html>
<html>
#<head> #<meta charset="utf-8"> #<title>HTML Forms</title> #</head> #<body> #<form action="index.html" method="post"> # <input type="text" id="name" name="user_name"> # <textarea id="comment" name="user_comment"> # <button>Submit Comment</button> #</form> #</body>
</html>
Thanks Francesco
Francesco Vittorio Beninato
3,624 PointsBummer! You need to add a <button> element inside the <form> element.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML Forms</title> </head> <body> <form action="index.html" method="post"> <input type="text" id="name" name="user_name"> <textarea id="comment" name="user_comment"> <button>Submit Comment</button> </form>
</body> </html>
Francesco Vittorio Beninato
3,624 PointsBummer! You need to add a <button> element inside the <form> element.
#####<html>
<head> <meta charset="utf-8"> <title>HTML Forms</title> </head> <body> <form action="index.html" method="post"> <input type="text" id="name" name="user_name"> <textarea id="comment" name="user_comment"> <button>Submit Comment</button> </form>
</body> </html>
14 Answers
Peter Ramsing
16,814 PointsI initially wanted to create a button that would submit the form. What they are looking for is just the button, though. Here's what I got to make it pass:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Forms</title>
</head>
<body>
<form action="index.html" method="post">
<input id="name" name="user_name" type="text">
<textarea id="comment" name="user_comment">
</textarea>
<!--Submit Button-->
<button>Submit Comment</button>
</form>
</body>
</html>
The button code was:
<button>Submit Comment</button>
Francesco Vittorio Beninato
3,624 Pointsstill don't understand why copying and pasting your code worked!! ;-))
Thanks Peter, thanks Christian!
Francesco
Neil Crowell
9,329 PointsThat's exactly what I've been doing and it still tells me I haven't added a button yet. Just the the plane button tags with the submit comment in between and it still doesn't work?!
Zach Lorber-Termaat
7,680 PointsA closing tag must be added to the textarea from step 3. You can pass step 3 without the closing tag but you cannot add the button successfully without the closing tag.
<body>
<form action="index.html" method="post">
<input type="text" id="name" name="user_name">
<textarea id="comment" name="user_comment"></textarea>
<button>Submit Comment</button>
</form>
</body>
Christian Frick
14,586 Pointstry
<button>Submit Comment</button>
or
<button type="button">Submit Comment</button>
Francesco Vittorio Beninato
3,624 Pointsno way! I think there is a bug or something!!
I will submit a technical request!
Thanks Christian
Tommy Yan
13,022 PointsYou need a closing tag for textarea
Yonatan Arbel
7,055 Pointsclosing the text area will resolve the issue <textarea></textarea>
jonroby
16,113 PointsI experienced a similar problem, but I don't know if it was due to the same reason. My issue was that I was adding a closing tag to input. This isn't valid. However, the code challenge will allow you to pass all the way to Question 4, but once there you won't pass until you remove the invalid /input tag. Also, you can check to determine if you forgot to add a closing tag to textarea.
Boy Buijsman
13,773 PointsBest comment, you forgot the </textarea>
Francesco Vittorio Beninato
3,624 Pointsoh yes! sorry coming soon I don't understand why it disappeared in the comment!
Christian Frick
14,586 PointsTry the Hashtag Icon before your sentence the HTML-Markdown-Tag
Francesco Vittorio Beninato
3,624 Pointsit doesn't work, or at least I'm not able to use it!!
Francesco Vittorio Beninato
3,624 Points'''<html> <head> <meta charset="utf-8"> <title>HTML Forms</title> </head> <body> <form action="index.html" method="post"> <input type="text" id="name" name="user_name"> <textarea id="comment" name="user_comment"> <button>Submit Comment</button> </form>
</body> </html> '''
Christian Frick
14,586 PointsThis Adds the Button:
<input type="submit">
Can you write the whole Challenge Description?
Francesco Vittorio Beninato
3,624 PointsAfter the textarea, create a button element. Between the button tags, write the text "Submit Comment". Don't add any attributes yet.
doesn't work, message: Bummer! You need to add a <button> element inside the <form> element.
tried <input type="submit"> doesn't work
Francesco Vittorio Beninato
3,624 Points'''html
<html> <head> <meta charset="utf-8"> <title>HTML Forms</title> </head> <body> <form action="index.html" method="post"> <input type="text" id="name" name="user_name"> <textarea id="comment" name="user_comment"> <button>Submit Comment</button> </form>
</body> </html>
'''
Austen Allred
6,521 PointsI had the same problem; my issue was that I hadn't closed the <textarea> with a </textarea>. That let the previous task pass, but ran into issues when I was creating a button (as I was technically trying to put a button inside of the textarea).
Yosef Ali
15,182 PointsThanks! Francesco
Ary de Oliveira
28,298 PointsHTML FORMS CHALLENGE TASK 3 OF 4...
After the name field, add another input for email addresses. Set the type attribute to "email", the id attribute to "email", and the name to "user_email".
i am nerd can't not solve this..... need help .... please
Christian Frick
14,586 PointsChristian Frick
14,586 PointsPost it please with the Markdown Cheatsheet