HTML Tag control-why does label Add the for Attribute?

Source: Internet
Author: User

Some of the materials we used to read often tell us:When using the form label Label, do not forget to add the for attribute to bind the ID attribute of the corresponding input control.~

Why?

Used to improve user experience. Generally, if your user name is followed by a <input...> tag, you can only select an input box to select your input box. If you add <lable for = ""...>, you can also select the control by clicking the problem next to the input box.It is generally used as a tag to facilitate the user experience of the mouse. Now, as a professional design, this label should be added to your page as a consideration.

Supports Browser display: safari, ie, Firefox...
Standard: HTML/XHTML

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.