Skip to main content

The <select> Element

As defined in the HTML Living Standard, the <select> element represents a control for selecting amongst a set of options.

Visual Example:

<label for="choice">Favorite Tag:</label> <select id="choice" name="choice"> <option value="main">main</option> <option value="article">article</option> </select> View HTML Living Standard: The select element

Accessibility Core: Name, Role, Value

The <select> element is a high-level interactive control. To be usable, it relies on being part of a semantic trio:

WCAG Requirement: Name, Role, Value

Success Criterion 4.1.2 (Level A): For all user interface components, the name and role can be programmatically determined...

A native <select> element handles the vast majority of this work for you. Screen readers announce the label, the element type, and the current selection as the user navigates. Custom "dropdown" widgets built with divs and spans often fail this criterion because they lack the built-in keyboard behavior and state reporting of the native select tag.

Understand SC 4.1.2: Name, Role, Value

Standard Attributes

<!-- Example of a multi-select listbox --> <select name="tags" id="tags" multiple size="4"> <option value="html">HTML</option> <option value="css">CSS</option> <option value="js">JavaScript</option> <option value="a11y">Accessibility</option> </select>

Best Practices

A11y Tip: Responsive States

On mobile devices, browsers often replace the desktop dropdown UI with a native modal picker. By using the standard <select> element, you automatically gain these OS-level optimizations, ensuring that touch targets are large and accessible for all users.