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 trialhighpriestess
5,486 PointsI need help with a code challenge.
I think something is wrong here. It says that I'm supposed to add a label above the radio button group that says 'Shirt Size'. I typed what's below and it says that it's wrong. I'm stumped. Isn't this a label?
<label> Shirt Size:</label>
<input type="radio" id="small" value="small" name="shirt_size">
<label for="small">Small</label>
<input type="radio" id="medium" value="medium" name="shirt_size">
<label for="medium">Medium</label>
<input type="radio" id="large" value="large" name="shirt_size">
<label for="large">Large</label>
4 Answers
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsDoesn't seem to be anything wrong with your code. I remember having problems with this challenge myself. However, I've just gone through and copied and pasted the code you supplied and it worked for me.
You could try replacing everything with the code below and see if works this time (not sure why it would make any difference but worth a shot):
<!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>
</select>
<label>Shirt Size:</label>
<input type="radio" id="small" value="small" name="shirt_size">
<label for="small">Small</label>
<input type="radio" id="medium" value="medium" name="shirt_size">
<label for="medium">Medium</label>
<input type="radio" id="large" value="large" name="shirt_size">
<label for="large">Large</label>
<button type="submit">Place Order</button>
</form>
</body>
</html>
Let us know if you're still having problems.
highpriestess
5,486 PointsJames,
That code did the trick.
Weird.
Thank you to everyone who responded.
Byron Twogood
14,631 PointsThe only thing I can suggest is look at your name, id, and value parameters and make sure those are correct...
Gloria Dwomoh
13,116 PointsHi again High, I suggest you check out this previous answer about putting the labels next to the input type. Check it out here
Gloria Dwomoh
13,116 PointsGloria Dwomoh
13,116 PointsHi High, I markdown your code so others can see it better. You can check the video on the right to learn how to do that as well :)