'label' sets the text for an 'optgroup' element : label optgroup « Form « HTML / CSS






'label' sets the text for an 'optgroup' element

    
<HTML>
<BODY>
<form name="form1" method="post" action="">
   <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>
   </select>
</form>
</BODY>
</HTML>  
    
      
      








Related examples in the same category