HTML HTML Forms Choosing Options Create a Select Menu

leosa
PRO
leosa
Pro Student 4,622 Points

Not sure what to do

Instructions: Add a label element to the select menu with the text "Shirt Color:"

Error: You need to add a label for the 'color' select element.

As you can see in my code, I'm stuck on Task 3. I'm not sure exactly what it wants me to do, but I did try some stuff.

Thanks in Advance!

<!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>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>
    </form>

  </body>
</html>

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 47,480 Points

You almost have it. You just need to bind the label to the select element by it's id. Try:

<label for="color">Shirt Color</label>