A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/elements/optgroup below:

optgroup ยท WebPlatform Docs

optgroup Summary

Allows authors to group choices logically in a select element.

Overview Table
DOM Interface
HTMLOptGroupElement
Examples

The following example shows how to use the OPTGROUP element to create groups of items in a drop-down list box.

<SELECT>
    <OPTGROUP LABEL="Alkaline Metals">
        <OPTION>Lithium (Li)</OPTION>
        <OPTION>Sodium (Na)</OPTION>
        <OPTION>Potassium (K)</OPTION>
    </OPTGROUP>
    <OPTGROUP LABEL="Halogens">
        <OPTION>Fluorine (F)</OPTION>
        <OPTION>Chlorine (Cl)</OPTION>
        <OPTION>Bromine (Br)</OPTION>
    </OPTGROUP>
</SELECT>
Notes Remarks

In HTML 4.01, all OPTGROUP elements must be specified directly within a SELECT element. Groups may not be nested. You can add OPTGROUP elements only to a SELECT element located in the same window where the OPTGROUP elements are created. This element is available in HTML as of Microsoft Internet Explorer 6.

Standards information HTML information

{

Related specifications
HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation
HTML 4.01
W3C Recommendation
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4