Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML label for Attribute

HTML

HTML label Tag Reference HTML

Example

Two radio buttons with labels:

 

 

 

 

 

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the for attribute.


Definition and Usage

The for attribute specifies which form element a label is bound to.


Differences between HTML 4.01 and HTML5

none.


Syntax

Attribute values

Value Description
element_id The id of the element that the label is bound to.

HTML label Tag Reference HTML