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

Gareth Powell
PLUS
Gareth Powell
Courses Plus Student 7,016 Points

How to pass "After the textarea, create a button element" question

Hi Everyone,

Probably a simple mistake but I cannot get the code to pass for the question:

"After the textarea, create a button element..."

Either it is my browser, or I am doing it wrong. however after numerous attempts, I just need to pass it.

Any help is much appreciated. Thanks

Garrett Sanderson
Garrett Sanderson
12,735 Points

Post your code so we can better understand what the problem is.

11 Answers

try this <textarea id="comment" name="user_comment"></textarea><button>Submit Button</button>

You need to do the input type submit command when making forms

Gareth Powell
PLUS
Gareth Powell
Courses Plus Student 7,016 Points

Thanks Garrett and Joseph.

Here is my code:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>HTML Forms</title>
  </head>
  <body>
   <form input action="index.html" method="post">
    <input type="text" id="name" name="user_name">
    <textarea id="comment" name="user_comment">
    <input type="button"><button>Submit Comment</button>
   </form>
  </body>
</html>

Probably doesnt help that I am tired looking at this but your help will be most appreciated.

Thanks, Gareth

OK i see what your problem is. You need to take out that input type="button". so just type <button>Submit Comment</button>

sorry about the earlier post about the input i needed to see your code. I went thru your quiz to make sure it works.

Gareth Powell
PLUS
Gareth Powell
Courses Plus Student 7,016 Points

Thanks for your continued help, Joseph.

That said, I applied the following and it still won't pass (maybe a bug in my browser? I'm using Chrome):

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>HTML Forms</title>
  </head>
  <body>
   <form input 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>

Try closing the text area tag. I see you opened it but did not close it before your button tag

Gareth Powell
PLUS
Gareth Powell
Courses Plus Student 7,016 Points

Still not working but thanks for your help.

Will keep trying!

Gareth Powell
PLUS
Gareth Powell
Courses Plus Student 7,016 Points

You did it! Thanks Joseph - that worked! Can't believe I didn't think of that. Cheers!

Nice. I was worried a second. Good luck on your studies.