Dropdown list code generator
This generator will allow you to create a dropdown list in HTML. Set the options for the list, then generate the code. You can copy and paste the generated code into your webpage, or you can choose to send the generated code to your email. This allows you to create the dropdown list code for later use when using a mobile device.If you need to create a dropdown menu (a navigation menu that opens on hover/click) instead of a form dropdown, check out our HTML Dropdown Menu Generator.
Frequently asked questions
What's the difference between the "value" and the "text shown"?
The text is what visitors see and pick from in the list. The value is what actually gets sent when the form is submitted - useful when you want to show something friendly ("Australia") but send something else your script expects ("AU"). Leave the value blank to just send the same text.
How do I let people select more than one item?
Choose "Allow multiple selection" under Behaviour. Visitors then hold Ctrl (or Cmd on Mac) while clicking to select several items at once - set how many rows should show at a time with the "number of items to show" field.
Should I add a button or leave it as just the dropdown?
Add a button if the dropdown needs to trigger an action by itself (like jumping to a page). Skip the button if the dropdown is one field inside a bigger form that already has its own submit button.
Inline, stylesheet or in-page style - which should I choose?
Inline is simplest for a one-off dropdown - the styling lives directly on the tag. Stylesheet is better if you're adding several styled elements to a site and want the CSS kept separately. In-page puts the CSS in a <style> block in the page's <head> - a middle ground when you can't edit an external stylesheet.
