HyperText Markup Language/Tag List/select
Use
[edit | edit source]This builds a List Box. Used for selecting a value from a list. This is to be used in relation with the option tag.
Example
[edit | edit source]<select name="animals">
<option selected value="Bird">Bird</option>
<option value="Reptile">Reptile</option>
<option value="Mammal">Mammal</option>
</select>
Required attributes
[edit | edit source]name
[edit | edit source]Name of the value in the form.
Optional attributes
[edit | edit source]class
[edit | edit source]Associated CSS classes.
dir
[edit | edit source]The direction of the text. You can choose from "ltr" (left to right) or "rtl" (right to left).
disabled
[edit | edit source]Locks in the control so the user cannot modify the value in the list box.
id
[edit | edit source]A string that is in the webpage.
lang
[edit | edit source]The ISO language code that you want to use for the tag.
multiple
[edit | edit source]Allows the value tag to allow multiple selections.
size
[edit | edit source]The size of the list box. It is measured in either rows or as a percentage on the screen.
style
[edit | edit source]CSS commands.
tabindex
[edit | edit source]The order of the controls received by the form.
title
[edit | edit source]The title of the tag.
Standard attributes
[edit | edit source]More info
[edit | edit source]A link to a page with more info, then the name of the site the info came from (i.e. W3Schools).