HomeReferencesHTML Tags

HTML Tag: select

A drop-down list form element. option elements within the select element define each list item.

HTML Dog, The Book HTML Dog book cover

HTML Dog is hosted by Titan Internet

Required Attributes

  • None.

Optional Attributes

  • name can be used so that the value of the selected option element can be processed.
  • size can be used to specify how many items of the list are displayed at any time. The default is 1.
  • multiple can be used to specify that more than one item from the list can be selected. This must be used in the format multiple="multiple".
  • disabled can be used to disable an element. It must be used in the format disabled="disabled".
  • tabindex can be used to specify where the element appears in the tab order of the page.
  • Common attributes

Example


<select name="dogs">
	<option>Domestic Dog</option>
	<option>Arctic Fox</option>
	<option>Maned Wolf</option>
	<option>Grey Wolf</option>
	<option>Red Fox</option>
	<option>Fennec</option>
</select>