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

Create and associate a label with each of the 3 shirt size radio buttons. Give them the text "Small", "Medium", and "Lar

I checked for answers to this question. I just do not see what I am doing wrong. I replaced shirt size with the three sizes in its respected place. But now it says task 3 is wrong.

index.html
<!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">
        <label for="small">small:</label>
          <input type="radio" id="small" value="small" name="shirt_size">
        <label for="medium">medium:</label>  
          <input type="radio" id="medium" value="medium" name="shirt_size">
        <label for="large">large:</label>  
          <input type="radio" id="large" value="large" name="shirt_size">    
                  <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>



      <button type="submit">Place Order</button>
    </form>
  </body>
</html>
Najibullah Arman
Najibullah Arman
Courses Plus Student 2,518 Points

good job thanks, here I would change the location of option tags to work properly. like this <!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="yellow">Yellow</option> <option value="purple">Purple</option> <option value="blue">Blue</option> <option value="green">Green</option> <option value="orange">Orange</option> <label for="small">small:</label> <input type="radio" id="small" value="small" name="shirt_size"> <label for="medium">medium:</label>
<input type="radio" id="medium" value="medium" name="shirt_size"> <label for="large">large:</label>
<input type="radio" id="large" value="large" name="shirt_size">
<option value="red">Red</option>

  </select>

  <button type="submit">Place Order</button>
</form>

</body> </html>

3 Answers

Joshua Pyo
Joshua Pyo
2,931 Points

There definitely is a bug on this part of exercise including the part 3 of the exercise. Team Tree House should come out and fix the bug!

Joshua Pyo
Joshua Pyo
2,931 Points

This is ridiculous but the following let me pass the step 4:

        <label>Shirt Size:</label>
          <input type="radio" id="small" value="small" name="shirt_size">
            <label for="small">Small</label>
        <label>Shirt Size:</label>
          <input type="radio" id="medium" value="medium" name="shirt_size">
            <label for="medium">Medium</label>
        <label>Shirt Size:</label>
          <input type="radio" id="large" value="large" name="shirt_size">
            <label for="large">Large</label>

I think the correct code should be:

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

Any suggestion?

Hi Corey,

First thing, you're supposed to create the three radio buttons below the select menu where the blank space is between the select menu and the submit button.

The way you did it, you have the radio buttons inside the select menu, which is essentially adding the radio buttons to the select menu and messing up the code for that.

If you just cut the six lines of code for the three labels and three radio buttons and paste it down below the select menu, and fix the indentation for the <option value="red">Red</option> your task will pass.

Thank you very much

I did what you said and now it says task 3 is wrong

<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 for="small">Small</label>
    <input type="radio" id="small" value="small" name="shirt_size">
  <label for="medium">Medium</label>
    <input type="radio" id="medium" value="medium" name="shirt_size">
  <label for="large">Large</label>
    <input type="radio" id="large" value="large" name="shirt_size">

  <button type="submit">Place Order</button>
</form>

</body> </html>

Task 3, you just add a label above the label for small.

<label>Shirt Size</label>

It looks like you already have Task 4 completed.

Joshua Pyo
Joshua Pyo
2,931 Points

it's not working like that somehow... sigh...

      <label>Shirt Size:</label>
        <label for="small">Small</label>
          <input type="radio" id="small" value="small" name="shirt_size">
        <label for="medium">Medium</label>
          <input type="radio" id="medium" value="medium" name="shirt_size">
        <label for="large">Large</label>
          <input type="radio" id="large" value="large" name="shirt_size">

I keep getting "Oops! It looks like Task 3 is no longer passing."