'option' Example : option « HTML Tag Reference « HTML CSS Reference






'option' Example

    

<html>
<head>
<title>option element example</title>
</head>
<body>
    <form name="form1" method="post" action="youractionscript.asp">
    <p>
        <span class="example">
            <select name="select1">
                <optgroup label="First Group">
                    <option>First item in first group</option>
                    <option>Second item in first group </option>
                    <option>Third item in first group </option>
                </optgroup>
                <optgroup label="Second Group">
                    <option>First item in second group </option>
                    <option>Second item in second group </option>
                    <option>Third item in second group </option>
                </optgroup>
                <optgroup label="Group 3">
                    <option>First item in Group 3</option>
                    <option>Second item in Group 3</option>
                    <option>Third item in Group 3</option>
                </optgroup>
            </select>
        </span>
    </p>
    </form>
</body>
</html>
    
      
      








Related examples in the same category

1.'option' Syntax and Note
2.'option' HTML Attributes
3.'option' Event Handlers
4.'option' CSS Attributes and JavaScript Style Properties
5.'option' Microsoft Behaviors
6.'option' JavaScript Properties
7.'option' JavaScript Methods
8.'option' JavaScript Collections
9.'option' JavaScript Objects