martin2k

The OPTGROUP Tag

HomeForumTutorials Tags:
 
 

Name

Option Group

Description

This tag allows you to arrange the items in a ComboBox control (defined by the SELECT tag).  Each group will start with a non-selectable header label with the items listed underneath.  The items are defined using the OPTION tag.

Attributes

LABEL

Specifies the name of the group that will appear in the ComboBox.

Related Tags

This tag is used within the SELECT tag.  OPTION tags are used within this tag to define the list items.

Example

Code

<select>
<optgroup label="Africa">
<option value="egypt">Egypt</option>
<option value="ethiopia">Ethiopia</option>
<option value="sudan">Sudan</option>
</optgroup>
<optgroup label="Europe">
<option value="france">France</option>
<option value="germany">Germany</option>
<option value="uk">UK</option>
</optgroup>
</select>

Generates


Please fill in the below form if you have any comments or additional information you want to add about the above information.  If you have any questions, please visit the ForumAny questions sent using this form will be ignored.

* - Mandatory

*Name: E-mail:

*Comments:

*Please type the following code (your comment cannot be accepted without it):


© Martin Allen 1999 - 2006.  Last updated Sunday 22 October 2006 07:54:27 PM +0100.