Skip to content
Related Articles

Related Articles

HTML | <optgroup> label Attribute

View Discussion
Improve Article
Save Article
  • Last Updated : 26 Jul, 2022
View Discussion
Improve Article
Save Article

The HTML optgroup label Attribute is used to specify a label for an <optgroup> Element.


<optgroup label="text"> 

Attribute Values: It contains the value i.e text which specify the description for a optgroup Element.


<!DOCTYPE html>
            label Attribute
<body style="text-align:center">
    <h1 style="color: green;">
    <h2>HTML optgroup label Attribute</h2>
        <!--A label optgroup-->
        <optgroup label="Sorting Algorithms">
            <option value="merge">
                Merge sort
            <option value="quick">
                Quick sort


Supported Browsers: The browsers supported by HTML optgroup label Attribute are listed below:

  • Google Chrome 1
  • Edge 12
  • Internet Explorer 5.5
  • Firefox 1
  • Apple Safari
  • Opera
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!