HTML

Source: Internet
Author: User

Definitions and Usage

<label> tags define annotations (tags) for the input element.

the label element does not render any special effects to the user. However, it improves usability for the user of the mouse. If you click Text within a LABEL element, the control is triggered. That is, when the user selects the label, the browser automatically shifts the focus to the form control associated with the label.

The For property of the <label> label should be the same as the id attribute of the related element.

instance

Simple HTML form with two input fields and related tags:

<form>
  <label for= "male" >Male</label>
  <input type= "Radio" name= "Sex" id= "male"/>
  <br/>
  <label for= "female" >Female</label>
  <input type= "Radio" name= "Sex" id= " Female "/>
</form>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.