Label Element - using id, label, for

Example 3.11 - Form Labels - Example 3.11

 <form method="get" action="https://cscie12.dce.harvard.edu/echo">
   <p>Do you like to watch NCAA basketball?
   </p>
   <input type="radio" name="basketball" id="basketball_y" value="Y"/>

   <label for="basketball_y">Yes   </label>
   <br/>

   <input type="radio" name="basketball" id="basketball_n" value="N"/>

   <label for="basketball_n">No   </label>
   <br/>

   <input type="submit" value="Submit"/>

 </form>

Do you like to watch NCAA basketball?



 

form labels