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

On the last button element created in the last step, add a type with the value button submit

This is my code <button type="Submit"</button> this didn't pass then i tried to end theword </form> it also did work any ideas

index.html
<!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"></textarea><button>Submit Comment</button> </form>
    <button type="Submit"></button>




  </body>
</html>

1 Answer

Hi!

You are closing the <form> element before you close the <button>. This is causing you an issue because for this challenge to pass the button has to be inside of the form. Also, I noticed that your <button> element is nested inside your <textarea>. You should pull the button out and have it afterwards. Make sure you only make one button as well! At the moment you have two when all of that should really be merged into one. If you are a bit confused look at the code below and it should clear it up for you!

<!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"></textarea>
      <button type="submit">Submit Comment</button>
    </form>
  </body>
</html>

Let me know if you have any problems or any more questions!

i tried end with </form> that also did work