<option> Description:
The <option> element defines elements in a select or drop-down list.
<option> Web Browser Support:
- Netscape 2, 3, 4, 6, 7
- Mozilla 1
- Firefox 1
- Internet Explorer 2, 3, 4, 5, 6
- Opera 3, 4, 5, 6, 7, 8
- Safari 1
- WebTV / MSNTV
- AvantGo Palm OS
- AvantGo Windows CE
- HTML 3.2, 4.0
- XHTML 1.0: XHTML Basic Forms Module, XHTML Forms Module
<option> Attributes:
- class (optional)
- dir (optional)
- disabled (optional)
- id (optional)
- label REQUIRED
- lang (optional)
- onclick (optional)
- ondblclick (optional)
- onkeydown (optional)
- onkeypress (optional)
- onkeyup (optional)
- onmousedown (optional)
- onmousemove (optional)
- onmouseout (optional)
- onmouseover (optional)
- onmouseup (optional)
- selected (optional)
- style (optional)
- title (optional)
- value (optional)
<option> End Tag:
</option> REQUIRED
<option> Contents:
Text. The following tags are valid within the <option> tag:
None
<option> Valid Context:
The <option></option> tag is valid within the following tags:
select, optgroup
<option> Usage:
- basic options list
<form> <select name="list"> <option>Name your favorite pet <option>dog</option> <option>cat</option> <option>rabbit</option> <option>horse</option> </select> </form>
- alternate item selected
<form> <select name="list"> <option>Name your favorite pet <option>dog</option> <option>cat</option> <option>rabbit</option> <option selected="selected">horse</option> </select> </form>
<option> Special Notes:
- Using the value attribute is a good idea, especially when the option text includes, spaces or other non-alphabetical characters.
- The end tag <option> is required in XHTML documents.

