VOOZH about

URL: https://www.geeksforgeeks.org/html/html-label-for-attribute/

⇱ HTML <label> for Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <label> for Attribute

Last Updated : 21 Jun, 2022

The HTML <label> for Attribute is used to specify the type of form element a label is bound to

Syntax:

<label for="element_id">

Attribute Values: It contains the value i.e element_id which specify the id of the element that the label is bound to. 

Example: This Example that illustrates the use of for attribute in <label> element. 

Output:

 👁 Image
 

Supported Browsers: The browser supported by HTML | <label>for Attribute are listed below:

  • Google Chrome 
  • Edge version 12 and above
  • Internet Explorer 
  • Firefox
  • Opera 
  • Safari 
Comment
Article Tags: