The ones I don't know... Tags

1. <label> tag

The <label> tag defines a label (markup) for the input element.

The label element does not present any special effects to the user. However, it improves usability for mouse users. This control fires if you click on text inside the label element. That is, when the user selects the label, the browser will automatically focus on the form control associated with the label.

The for attribute of the <label> tag should be the same as the id attribute of the associated element.

<form action="demo_form.asp">
  <label for="male">Male</label>
  <input type="radio" name="sex" id="male" value="male"><br>
  <label for="female">Female</label>
  <input type="radio" name="sex" id="female" value="female"><br>
  <input type="submit" value="提交">
</form>

The "for" attribute binds the label to another element. Please set the value of the "for" attribute to the value of the id attribute of the associated element.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324944794&siteId=291194637