Easy Tutorial
❮ Prop Video Defaultplaybackrate Css Colors Legal ❯

OptionGrouplabel Attribute

OptionGroup Object

Example

Change the label/description of the option group:


Definition and Usage

The label attribute sets or returns the value of the label attribute of the option group.

The label attribute specifies the label/description of the option group.


Browser Support

All major browsers support the label attribute.


Syntax

Return the label attribute:

Set the label attribute:

Attribute Values

Value Description
text Specifies the label/description of the option group.

Technical Details

| Return Value: | String, representing the label of the option group. | | --- | --- |


More Examples

Example

Return the label/description of the option group:

x Output result:


Related Articles

HTML Reference: HTML <optgroup> label Attribute


OptionGroup Object

❮ Prop Video Defaultplaybackrate Css Colors Legal ❯