Can I use label element with select?

html, html-select, label, w3c-validation

Solution

Yes, it's valid and works fine.

This attribute explicitly associates the label being defined with another control.

http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1

Problem

Can I use label element with select? Most of the places I see label example with input elements only. What does standard say about label association? Is it a valid HTML markup? ``` <label for="id_select"> Options </label> <select id="id_select" autofocus="true"> <option value="1"> Option1 </option> <option value="2"> Option2 </option> </select> ```

Original source