Home Tutorials HTML Tutorial Select and Option
Select and Option

Select and Option


29. Select and Option

The <select> element creates a dropdown list, and <option> defines each choice. This is useful when users should select from predefined values.

Syntax

<select>
    <option>Item</option>
</select>

Example

<select>
    <option>Python</option>
    <option>HTML</option>
    <option>JavaScript</option>
</select>

Output

A dropdown box appears with three selectable options.
Example

🏋️ Test Yourself With Exercises

Take our quiz on Select and Option to test your knowledge.

Browse Quizzes »