HTML HTML Forms Choosing Options Create Checkboxes

I don't know what I did wrong but any help is appreciated. Thank you in advance!

it says what I did wrong: You need to add a <label> element with it's "for" attribute set to "shipping" within the <form> element.?

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">
        <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><br>
      <input type="radio" id="medium" value="medium" name="shirt_size"><label for="medium">Medium</label><br>
      <input type="radio" id="large" value="large" name="shirt_size"><label for="large">Large</label><br>
      <checkbox type="fast_shipping" id="shipping"></checkbox>
      <input type="checkbox" id="shipping" value="fast_shipping">
      <input type="checkbox" id="newsletter" value="subscribe">
      <label type="checkbox" value="Fast shipping"><br>
        name="user_shirt size"><label class="light" for="fast_shipping">Fast Shipping</label><br>
      <label type="checkbox" value="Subscribe to Newsletter"><br>
        name="user_shirt size"><label class="light" for="subscribe">Subscribe to Newsletter</label><br>

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

1 Answer

Steven Parker
Steven Parker
159,145 Points

I see a few issues here:

  • there are two incomplete pieces of a tag near the labels that say: name="user_shirt size">
  • there are two extra label tags that don't belong, both have type="checkbox" which is not a property of a label
  • the "for" value of each label should be the same as the "id" property of the associated check box.
  • the instructions didn't ask for a class to be added to the labels

It also looks like you've added a "checkbox" element (which is not a valid element type) with the same ID as the real check box (and only one of any ID should be in the document), but the verifier doesn't seem to mind.