Enter HTML5 entry to proficient:<label> label

Source: Internet
Author: User
Keywords tags HTML5 Getting started to master

"Reprint please retain the integrity of the content of the Wind network article, if you do not comply with this principle, we will retain the right to pursue legal responsibility"

<label> Label

Definitions and usage

The <label> label defines the callout for the control. 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.

Differences between HTML 4.01 and HTML 5

No.

Tips and comments

Wind Network (www.ithov.com) Note: The For attribute binds a label to another element. Set the value of the for property to the value of the id attribute of the related element.

Property

The

property value describes the form element to which the definition label is 4 5 for Id_of_another_field. Set to the ID of the form element. Note: If this property is not specified, the label associates its contents. 4 5

Standard properties

Class, Contenteditable, ContextMenu, dir, draggable, id, irrelevant, lang, ref, Registrationmark, TabIndex, template, For a complete description of the title, visit the standard properties in HTML 5.

Event Properties

Onabort, onbeforeunload, onblur, onchange, onclick, OnContextMenu, ondblclick, Ondrag, Ondragend, OnDragEnter, Ondraghttp://www.aliyun.com/zixun/aggregation/29841.html ">leave, OnDragOver, ondragstart, OnDrop, OnError, onfocus, onkeydown, onkeypress, onkeyup, onload, OnMessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup , OnMouseWheel, OnResize, Onscroll, Onselect, onsubmit, onunload for a complete description, please visit the event properties in HTML 5.

Tiy Instance Label

How to define a tag for a control.

<html>
<body>
<p> Please click on one of the text tags Wind Network (www.ithov.com), you can trigger the related control:</p>
<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>
</body>
</html>

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.