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

how do you create a button element inside a form element

challenge task 4 of 5 in html forms

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" name="user_comment"></textarea><input type="button" id= "Submit Comment"</button></form>
  </body>
</html>
Caroline Forslund
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Caroline Forslund
Front End Web Development Techdegree Graduate 36,096 Points

There is an input type named submit, and that creates a submit button in the form. Like this:

<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" name="user_comment"></textarea>
          <input type="submit" id="submit_comment" value="Submit Comment">
      </form>
  </body>
</html>

4 Answers

Thanks Caroline but that didn't work regards malcolm

Thanks caroline that worked

Thank you Caroline, great stuff is'nt it thank you very much regards malcolm