Field Selection
The <select> element is the standard way to offer a list of options. It's compact, familiar, and handles its own UI state on mobile and desktop.
The Structure
A basic dropdown consists of a wrapper select element containing multiple option elements. The value attribute on an option is what is sent to the server, while the text content is what the user sees.
Grouping Options
Long lists can be overwhelming. The <optgroup> element allows you to group related options under a common label. This label appears in the dropdown but is not selectable itself.
Multi-Select
By adding the multiple boolean attribute, you transform a standard dropdown into a list box where users can select multiple items (usually with Ctrl/Cmd + Click).
View Full Transcript+
This section contains the detailed transcript of the video lessons covering the select tag, option syntax, optgroup usage for categorization, and the multiple attribute for multi-selection scenarios.
