Example of Combobox (Dropdown List) with Label
This page contains an example of techniques described in Part 2 of the Basic Web Accessibility Tutorial. If you have reached this page without reviewing the Basic Web Accessibility Tutorial, you may do better to start there.
HTML markup of the above example:
<label for="mode">My main mode of transportation is:</label><select id="mode"><option value="car">car</option><option value="bus">bus</option><option value="bicycle">bicycle</option><option value="walking">walking</option></select>
Notice in the above example that the <select> element has an id attribute that exactly matches the for attribute of its <label> element.
