HTML Select Generator
Build a fully configured HTML <select> dropdown — with options, placeholder, and attributes — and copy the ready-to-use HTML.
Last updated: May 21, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is HTML Select Generator?
The HTML `<select>` element creates a dropdown list from which users pick one (or more) values. Each choice is an `<option>` child with a `value` attribute and display text.
Key attributes: `multiple` lets users select several options (renders as a list box); `size` sets visible rows in a list box; `required` forces the user to pick before submitting; `disabled` grays out the entire control. Individual `<option>` elements can also carry `selected` (pre-selected) and `disabled` (un-selectable) flags.
How to Use HTML Select Generator
Enter a name attribute for the select element
Add options with their display text and value
Mark an option as selected or disabled if needed
Toggle multiple selection, required, or disabled on the element
Optionally add a placeholder option at the top
Copy the generated HTML
Common Use Cases
- Building form dropdowns for country, state, or category selection.
- Creating multi-select list boxes for tag or filter inputs.
- Generating accessible form controls with pre-selected defaults.
Example Input and Output
A required country dropdown with a placeholder and three options.
Name: country, Placeholder: Select a country
Options: US (United States), GB (United Kingdom), CA (Canada)
Required: true<select name="country" required>
<option value="" disabled selected>Select a country</option>
<option value="US">United States</option>
<option value="GB">United Kingdom</option>
<option value="CA">Canada</option>
</select>Privacy
All HTML generation runs in your browser. No data is sent to any server.
Frequently Asked Questions
How do I pre-select an option?
Add the selected attribute to the desired <option> element. Only one option should be selected in a standard dropdown; in a multiple select any number of options can carry the selected attribute.
What does the size attribute do?
In single-select mode, size controls the number of visible rows — values above 1 render the dropdown as a scrollable list box instead of a collapsed dropdown. In multiple mode the default size is 4 if not set.
Related Tools
HTML Text Input Generator
Generate HTML text input elements with placeholder, minlength, maxlength, pattern, autocomplete, spellcheck, and label attributes. Live preview included.
HTML Textarea Generator
Generate HTML textarea elements with rows, cols, placeholder, minlength, maxlength, wrap, spellcheck, and label attributes. Live preview included.
HTML Checkbox Generator
Generate HTML checkbox input elements with label, id, name, value, checked, disabled, and required attributes. Includes live preview.
HTML Radio Button Generator
Generate HTML radio button groups with configurable options, name, id prefix, fieldset legend, and checked/disabled states.
HTML Button Generator
Generate HTML button elements with type, id, class, style, onclick, disabled, aria-label, and other attributes. Preview included.
HTML Color Input Generator
Generate HTML <input type="color"> code with live preview. Customise id, name, default colour, label, and more.

