IT. Expert System.

HTML

optgroup


Tag Description

The optgroup tag is used to group together related options in a select list.

This tag has the form:

<optgroup label="text">
</optgroup>

Attributes

Attribute Value Description
label text (required) Specifies the label for an option-group
disabled disabled Specifies that an option group should be disabled

HTML5 and HTML4.01 Differences

None.

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<select>
  <optgroup label="Group 1">
    <option value="Option 1A">
      Option 1A
    </option>
    <option value="Option 1B">
      Option 1B
    </option>
  </optgroup>
  <optgroup label="Group 2">
    <option value="Option 2A">
      Option 2A
    </option>
    <option value="Option 2B">
      Option 2B
    </option>
  </optgroup>
</select>

This produces the following result:

Browser Support

Chrome Firefox IE Safari Opera

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML4
Empty Tag: No


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 143 / 158702037. Delta: 0.04287 с