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 trialAbson Chifodya
11,817 Pointsadd a label element to the select menu with the text "shir' color"
add a label element to the select menu with the text "shir' color"
may someone show how it is supposed to be
<!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>
<select id="color" name="shirt_color">
<label for="Color">Shirt Color</label>
<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>
</select>
</form>
</body>
</html>
3 Answers
mrtroy
8,069 PointsMy research tells me that attributes of elements are case-insensitive but the checker on Treehouse may not be. Try changing the "Color" to just "color"
Happy Coding!
ABOLFAZL BAYAT
4,767 PointsAdd "label" element outside "select" element.
<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">Purople</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
<option value="orange">Orange</option>
</select>
</form>
Steven Parker
231,269 PointsIt looks like you added your label inside the select
element (where only option
elements should be). Try placing it just above the select instead.
Also, ID names are case-sensitive; and it looks like you wrote "Color" (with a capital "C") instead of "color".
Steven Parker
231,269 PointsSteven Parker
231,269 PointsI think you're confusing attribute names (which are not case-sensitive) with attribute values (which are case sensitive).