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

Charles Sipe
Charles Sipe
3,898 Points

"Bummer! You need to add a label for the 'color' select element."

I'm feeling a little stuck here.

I am adding <label>Shirt Color:</label> after the opening select tag and I get this error.

I'm not sure what the error means because I am adding the label tags inside the select tags so is that different than adding it "for the color select element"? I may be missing an attribute?

2 Answers

Sreng Hong
Sreng Hong
15,083 Points

Hi Charles!! In the label tag, you need to add attribute for to color and it should be like this

<label for="color">Shirt Color:</label>
<select id="color" name="shirt_color">

    ...

</select>
Charles Sipe
Charles Sipe
3,898 Points

Cool, thanks! I'll try that.