Difference between revisions of "For attribute (HTML)"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) (Created page with "In HTML, the for attribute ...") |
Karl Jones (Talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | In [[HTML]], the for attribute ... | + | In [[HTML]], the '''for attribute''' is an attribute of the [[Label (HTML element)|label element]]. |
+ | |||
+ | == Description == | ||
+ | |||
+ | The caption can be associated with a specific form control: | ||
+ | |||
+ | * Using for attribute. | ||
+ | * By putting the form control inside the label element itself. | ||
+ | |||
+ | == HTML Attributes == | ||
+ | |||
+ | === Associating fieldset with form owner === | ||
+ | |||
+ | form = string | ||
+ | |||
+ | Associate the fieldset element with its form owner. | ||
+ | |||
+ | === Indicate a form control === | ||
+ | |||
+ | for = string | ||
+ | |||
+ | Specified to indicate a form control with which the caption is to be associated. | ||
+ | |||
+ | The attribute's value must be the ID of a labelable form-associated element in the same Document as the label element. | ||
+ | |||
+ | == See also == | ||
+ | |||
+ | * [[HTML]] | ||
+ | * [[HTML element]] | ||
+ | * [[Label (HTML element)]] | ||
+ | |||
+ | == External links == | ||
+ | |||
+ | * [http://stackoverflow.com/questions/18432376/what-does-for-attribute-do-in-html-label-tag What does “for” attribute do in HTML <label> tag?] @ w3schools.com | ||
+ | |||
+ | |||
+ | [[Category:HTML attributes]] | ||
+ | [[Category:HTML elements]] | ||
+ | |||
+ | |||
+ | |||
+ | http://www.w3schools.com/tags/att_label_for.asp |
Latest revision as of 05:25, 2 May 2016
In HTML, the for attribute is an attribute of the label element.
Contents
Description
The caption can be associated with a specific form control:
- Using for attribute.
- By putting the form control inside the label element itself.
HTML Attributes
Associating fieldset with form owner
form = string
Associate the fieldset element with its form owner.
Indicate a form control
for = string
Specified to indicate a form control with which the caption is to be associated.
The attribute's value must be the ID of a labelable form-associated element in the same Document as the label element.
See also
External links
- What does “for” attribute do in HTML <label> tag? @ w3schools.com