'label' sets the text for an 'optgroup' element : label optgroup : Form Attributes HTML CSS TUTORIALS


HTML CSS TUTORIALS » Form Attributes » label optgroup »

 

'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>  
    
      
      



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Form Attributes
» label optgroup