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

Jeffery Austin
Jeffery Austin
8,128 Points

Having issues in a code challenge. My check is telling me I don't have an option for "red". But I do?

<select id="color" name="shirt_color">

<option label="red">Red</option> <option label="yellow">Yellow</option> <option label="purple">Purple</option> <option label="blue">Blue</option> <option label-"green">Green</option>

</select>

This is how my code reads....

Hi Jeffrey,

Can you post your code please?

This post will tell you how to use the markdown if needed.

Thanks

-Rich

Jeffery Austin
Jeffery Austin
8,128 Points

<select id="color" name="shirt_color"> <option label="red">Red</option> <option label="yellow">Yellow</option> <option label="purple">Purple</option> <option label="blue">Blue</option> <option label="green">Green</option> <option label="orange">Orange</option> </select>

2 Answers

HI Jeffrey,

Based on the question you just need to swap the word label for value:

Add the following options to the select menu: Red, Yellow, Purple, Blue, Green, and Orange. Set their value attributes to the same words, but in all lowercase.

Hope that helps

-Rich

Jeffery Austin
Jeffery Austin
8,128 Points

Oh okay thanks. Not sure how I missed that..

No problem, easily done :)

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