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 HTML Forms Form Basics Create a Submit Button

Challenge 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

Post it please with the Markdown Cheatsheet

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

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

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

still don't understand why copying and pasting your code worked!! ;-))

Thanks Peter, thanks Christian!

Francesco

That'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?!

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

try

<button>Submit Comment</button>

or

<button type="button">Submit Comment</button>

no way! I think there is a bug or something!!

I will submit a technical request!

Thanks Christian

You need a closing tag for textarea

closing the text area will resolve the issue <textarea></textarea>

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

Best comment, you forgot the </textarea>

oh yes! sorry coming soon I don't understand why it disappeared in the comment!

Try the Hashtag Icon before your sentence the HTML-Markdown-Tag

it doesn't work, or at least I'm not able to use it!!

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

This Adds the Button:

<input type="submit">

Can you write the whole Challenge Description?

After 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

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

'''

I 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).

Thanks! Francesco

HTML 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