HTML <label> for Attribute
HTML <label> tag
Example
An simple HTML form with two input fields and related labels :
<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> |
Try it yourself »
|
Definition and Usage
The for attribute specifies which form element a label is bound to.
Browser Support

The for attribute is supported in all major browsers.
Note: Not supported in Safari 2.0 or earlier versions.
Syntax
Attribute Values
| Value |
Description |
| element_id |
The id of the element the label is bound to |
HTML <label> tag
Stylus Studio® 2010 XML Enterprise Suite raises the bar for productivity in XML development tools.
Millions of XML developers and data integration specialists turn to Stylus Studio's comprehensive and intuitive
XML toolset to tackle today's advanced XML data transformation and aggregation challenges.
|
- XML Pipeline Editor, Debugger and Code Generator
- DataDirect XML Converters
- XQuery Mapper, Editor, Debugger, and Profiler
- XSLT Mapper, Editor, Debugger, Designer, and Profiler
- Java and C# for .Net Code Generation
- XML Schema Designer With Documentation Generator
- XML Editor With Full XPath Integration
Download a free trial now
|
|