How to create a dropdown list in html?

-3

How to create something like this with html? Or what is best to use to create?

    
asked by anonymous 25.12.2017 / 18:40

2 answers

2

You are looking for the select tag. one of the names of this element is dropdown.

<select name="cars">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="fiat">Fiat</option>
  <option value="audi">Audi</option>
</select> 
    
25.12.2017 / 19:19
-1

.... you can also provide the "select" html element for the user to make multiple selections of "options", declaring it as follows:   . Repair the " multiple " attribute.

In this way, select from more than 1 "option", the user must hold down the "Ctrl" key while making the selections of more than 1 "option".

However, if the user has to select multiple options, the use of the "checkbox" html element, since this element has no restriction on the Operating System, while the Select with multiple attribute on MAC the key that you must hold while making the selection with the mouse is not the same CTRL key used in Windows or LINUX. On Linux the CTRL key is also used, but on the MAC it is not.

Thank you.

    
25.12.2017 / 20:52