<select>

Description

This attribute creates a drop-down or pick list. The options displayed on the list are created by using the <option> element.

Example


<html>
<body>
     <form>
        <select name="select1">
               <optgroup label="First Group">
                    <option>First</option>
                    <option>second</option>
                    <option>third</option>
               </optgroup>
       </select>
     </form>
</body><!--from w ww .  j ava  2 s  . com-->
</html>

Click to view the demo

The code above generates the following result.

select




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference