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 HTML Mastery

Ahmed Hassan
Ahmed Hassan
5,533 Points

I'm taking the HTML course and I'm stuck on the <button> tag challenge!

Please advise..

<form> <form action="http://www.example.com/" method="get"> <input type="text" name="Hello World" value="Hello World"> <button type="submit" value="submit">submit</button> </form>

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>HTML Mastery Challenge</title>
  </head>
  <body>
    <h1>HTML Mastery Challenge</h1>

    <!-- Write your code below -->
<div>
  <h2>Shopping List</h2>
    <ol>
      <li></li>
      <li></li>
      <li></li>
    </ol>
    </div>
    <p><strong></strong></p>
    <form>
      <form action="http://www.example.com/" method="get"> 
      <input type="text" name="Hello World" value="Hello World">
      <button type="submit" value="submit">submit</button>
  </form>

    </form>
  </body>
</html>

You have two </form> tags.

2 Answers

Marcel Schmidt
Marcel Schmidt
12,134 Points

You have a form ensted inside a form

<form>
      <form action="http://www.example.com/" method="get"> 
      <input type="text" name="Hello World" value="Hello World">
      <button type="submit" value="submit">submit</button>
  </form>

That's not something you can do.

Ahmed Hassan
Ahmed Hassan
5,533 Points

Yes you are right.. but still after correcting it, the challenge keeps giving me Bummer! I hate that red word :D

I think the problem is that your form method it's get. and the action you put anything or they said to put it?

<form action="#" method="POST">

      <input type="text" name="Hello World" value="Hello World">
      <button type="submit" value="submit">submit</button>
  </form>
Ahmed Hassan
Ahmed Hassan
5,533 Points

I already removed the "action" from the form and it worked. Thanks :)