HTML - Tags - <optgroup>

#96 of 147
Prev ol

     <label>Choose your meal:<label>
         <optgroup label="Meat">
             <option value="chicken">Chicken</option>
             <option value="beef">Beef</option>
         <optgroup label="Veggie">
             <option value="eggplant">Eggplant</option>
             <option value="pasta">Pasta</option>

The optgroup element creates a group of options that can be included inside of a select list.

A live example:

N of

Ads by Google

Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath