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

Daniel Schwemmlein
Daniel Schwemmlein
4,960 Points

Hey. It still won't let me create my button

it just asks me to create a button and between the button tags add "Submit Button" don't add any attributes. So this is what i did first: <button>"Submit Button"</button> after that I tried it without the quotes and it would not work either. It always tells me to add the button tags within the form element. I even did that as well. I added the code for the button in the line where i have the code for the form. no change. still gives me the same error. Anyone any ideas?

3 Answers

Hugo Paz
Hugo Paz
15,622 Points

Hi Daniel,

Did you put the button code inside the form tags like this?

<form>
<button>Submit Button</button>
</form>
Daniel Schwemmlein
Daniel Schwemmlein
4,960 Points

yes. did that. gave me the same error again

Hi Daniel,

If you've added the button after the textarea and it's telling you that you still need to add it then it's likely you didn't close off your textarea.

Make sure that you've closed off your textarea with </textarea> and you add your button element after that.

Also, the text for the button was supposed to be "Submit Comment"

<button>Submit Comment</button>

Joshua Ferreira
Joshua Ferreira
1,161 Points

Thanks I had the same problem as Daniel and just fixed it by closing the text area.

Daniel Schwemmlein
Daniel Schwemmlein
4,960 Points

I closed the textarea with a textarea closing tag. And I tried it with quotes in the last line and without. Nothing worked. Still says that its wrong

Hugo Paz
Hugo Paz
15,622 Points

Daniel,

This is the full solution to the challenge, please compare it to yours.

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