What is the correct HTML for making a drop-down list?

In HTML, a drop-down list is made up of one or more <option> elements and the <select> element. Each <option> element inside the <select> element represents each item in the drop-down list that is defined by the element.

The following is basic syntax:
<select name=""dropdownName"" id=""dropdownId"">
<option value=""optionValue1"">Option 1</option>
<option value=""optionValue2"">Option 2</option>
</select>"

Go from files to website in seconds.

Start a free trial for 7 days — no credit card required

Get Started for Free