Skip to content
Related Articles

Related Articles

Improve Article

HTML <label> for Attribute

  • Last Updated : 25 Apr, 2019

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


Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

<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.

<!-- HTML code to illustrates label tag -->
<!DOCTYPE html>
        HTML | for Attribute
        body {
            font-size: 20px;
<body style="text-align:center">
    <h1 style="color:green"
      HTML | <label>for Attribute
        <!-- Starts label tag from here -->
        <label for="student">
        <input type="radio"
        <label for="business">
        <input type="radio" 
        <label for="other">
        <!-- Ends label tags here -->
        <input type="radio"


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

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :