x
 
<!DOCTYPE html>
<html>
<body>
<h1>label for 属性</h1>
<p>单击文本标签之一可切换至相关单选按钮:</p>
<form action="/demo/action_page.php">
  <input type="radio" id="html" name="fav_language" value="HTML">
  <label for="html">HTML</label><br>
  <input type="radio" id="css" name="fav_language" value="CSS">
  <label for="css">CSS</label><br>
  <input type="radio" id="javascript" name="fav_language" value="JavaScript">
  <label for="javascript">JavaScript</label><br><br>
  <input type="submit" value="提交">
</form>
</body>
</html>