Label Element - using id, label, for

Example 3.11 - Form Labels - Example 3.11

 <form method="get" action="https://cs12.net/form/submit.php">
   <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