<option>

Description

This element is used to create a list item in a <select> element list.

Example


<html>
<body>
     <form>
          <select name="select1">
              <optgroup label="First Group">
                   <option>First</option>
                   <option>second</option>
                   <option>third</option>
              </optgroup>
          </select>
     </form>
</body><!--  www  .  j a  v  a2s .co m-->
</html>

Click to view the demo

The code above generates the following result.

option




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference