How to use SELECT element in HTML when we have a large set of values (like more than 100) to select from?

Viewed 32

In the below html, I think it is not efficient to create individually all the 100+ values. So is there any alternative to it?

<form action="">
    <label for="cars">Choose a car:</label>
    <select name="cars" id="cars">
        <option value="volvo">Volvo</option>
        <option value="saab">Saab</option>
        .
        .
        <!-- more than 100 such values-->
        .
        .
    <option value="opel">Opel</option>
    <option value="audi">Audi</option>
</select>

  <br>
  <input type="submit" value="Submit">
</form>
0 Answers
Related