The select element creates a drop-down like menu that can have one or more options to choose.

One option is a minimum number that has to be defined.

With the attribute selected being preset, an option (or more of them) appears selected when the page is being rendered.

The element <optgroup> is used to group thematically similar options together.

Syntax:

<select name=""><optgroup><option value=""></option></optgroup></select>

Attributes:

Example

HTML select menu elements:

 

›› go to examples ››