HTML HTML Forms Choosing Options Create Radio Buttons

Anthony Jones
Anthony Jones
2,662 Points

html label not working

I'm trying to progress on this code challenge. The workspace says that I need to enter "Shirt Size:" into the label element without assosiating it to any further elements. But It won't accept it. Any suggestions?

<!DOCTYPE html>
    <meta charset="utf-8">
    <title>HTML Forms</title>
    <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>
        <label>Shirt Size:</label>
        <input type="radio" id="small" value ="small" name="shirt_size">
        <input type="radio" id="medium" value ="medium" name="shirt_size">
        <input type="radio" id="large" value ="large" name="shirt_size">

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

2 Answers

Anthony Jones
Anthony Jones
2,662 Points

Thank you. That worked perfectly. Sometimes you can look at the code so long it all looks right.

Robbie Thomas
Robbie Thomas
31,090 Points

In line 12:

        <input type="radio" id="small" value="small" name="shirt_size">

Here is a website that tells about radio buttons in HTML