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 Choosing Options Create a Select Menu

Again ... it looks perfect to me - but apparently, I'm missing something.

I checked that I have all the closing > characters. I typed the button element within the "form" as instructed. I rewatched the video. What is wrong?

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>HTML Forms</title>
  </head>
  <body>

    <form action="index.html" method="post">
      <h1> "Shirt Order Form" </h1>
      <label for="color">Shirt Color:</label>
       <select id="color" name="shirt_color">
         <option value="red">Red</option>
          <option value="yellow">Yellow</option>
            <option value="purple">Purple</option>
              <option value="blue">Blue</option>
                <option value="green">Green</option>
                  <option value="orange">Orange</option>

    <button type="submit">Place Order:</button>

    </form>

  </body>
</html>
Kole Riggs
Kole Riggs
732 Points

I threw it into my workspace and I messed around with it and I don't see anything weird with the code... :(

But after messing with it I don't understand why you chose to add lines; html action="index.html" method="post"> in the first <form> section because the code runs as you would need it to without those maybe from your end this could be causing an issue? are you calling method="post" improperly?

I hope this helps again i am new so forgive me if I am wrong here. :)

That part was already there. When the challenge begins, with the first task, is After <h1> Shirt Order Form </h1>

The other odd thing I was going to inform you of, but thought it would take too long, and since it finally worked, I let it go - but since you mentioned you didn't see a problem with this last answer I gave - is that: once I went back to correct the first issue you helped me with, it still didn't work. So, I copy/pasted the line and put it in a couple of different places to no avail - then I put it back where I had it to begin with and it worked. It was VERY irritating because you were correct: the only issue was I had forgotten (or accidentally erased it) the one closing > after select element . (to refresh your memory - it was this line:: <label for="color">Shirt Color:</label>

I remember this happened a few times with the pre-req track.

Thanks for your time!

1 Answer

Steven Parker
Steven Parker
229,744 Points

You're missing the closing "</select>" tag (after the options).

Ok, so I put it at the top - instead of the bottom (even though it was still inside the "form" because it was Before the closing </form> .... and it worked?

I thought the rule was "as long as it is in the form" - it didn't say at top or bottom or anything else - it just said "in the form"

This kind of stuff gets me confused.

AGAIN! Here is what I have - right now in another tab & it says its wrong: <label>"Shirt Size:"</label>

Here is what the example looks like in the video: <label>Age:</label>

I have tried it with and without quotation marks, I've moved it around, I have watched the video Three times. It is driving me nuts.

Steven Parker
Steven Parker
229,744 Points

You do not need quotes in the label. Also, don't add quotes to the h1 heading.