Glubase - share your knowledge


All / Computers / Programming / HTML / XHTML





  • View Command

HTML / XHTML Reference

HTML / XHTML optgroup definition

Syntax

<optgroup> ... </optgroup>

Description

Defines an option group. This element allows you to group choices.

Attributes

Common attributes.

Example

[Try this example yourself]
<select>
  <optgroup label="first group">
    <option value="first">first</option>
    <option value="second">second</option>
  </optgroup>
  <optgroup label="second group">
    <option value="third">third</option>
    <option value="fourth">fourth</option>
  </optgroup>
</select>

Output

  • Comments

No comments added.