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

Stuck on html forms quiz "add a submit button"

here is my code, cant seem to figure it out.

<form action="index.html" method="post">
      <h1>Shirt Order Form</h1>
      <label for="color">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>

4 Answers

Michael Flynn
Michael Flynn
3,084 Points

You're forgetting to close the select tag

whoops! good call. I find it kind of weird that the quiz lets you continue missing the closing select tag. weird

Joe Hanson
Joe Hanson
4,209 Points

Ah, I was making the same mistake! Thank you :)

Justin Hunter
PLUS
Justin Hunter
Courses Plus Student 11,484 Points

Could it be unrelated to the submit button? The value for purple is capitalized while all the others are lowercase.

good catch, but it's purely related to the submit button. it keeps telling me it needs to be nested within the form, which it is. can't figure out if I'm doing something wrong or if the quiz is bugged.

Justin Hunter
PLUS
Justin Hunter
Courses Plus Student 11,484 Points

Looks like your <select> tag is not closed. That's going to be the issue. Should have seen that first, sorry!

Markus Mรถnch
Markus Mรถnch
16,383 Points

same here it should not allow to continue without having the select element closed with </select>