option (HTML4 & HTML5)

Specifies an option in a select (selection list) element.

Properties & Events

KeyDescriptionAvailability
classCSS class assigned to the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
dirDirection of the element text.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
disabledSpecifies whether or not the element is disabled.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
idUnique identifier for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
labelShort text description for the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 4.0
langLanguage code for the content of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
languageScript language for the element.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera ??
selectedIf present, specifies that the element selected by default.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
styleInline style for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
titleShort text description for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
valueText containing the value of the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
onclickFires when the element is clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
ondblclickFires when the element is double-clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeydownFires when a user presses down on a key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeypressFires when a user presses a key or holds down the key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeyupFires when a user releases a key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmousedownFires when a user clicks down on the mouse button while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmousemoveFires when the mouse moves while the pointer over the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseoutFires when the mouse pointer moves off of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseoverFires when the mouse pointer moves over the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseupFires when the user releases the mouse button while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0

Examples having uses of: 'option'

4 votes
11k views

HTML5 Datalist

Think of a combination of an input text element and selection list. Typically used where there is the likelihood of a visitor entering a value of other (not one of the items in the list).
0 votes
2k views

jQuery - Multiple CSS properties

jQuery allows to change the multiple CSS properties value at once.
1 votes
2k views

Html Input Form

Example form using <legend> and <fieldset> to make the form layout fancy.
1 votes
2k views

jQuery Focus & Change Event

jQuery events can be used to register behaviors to take effect when the user interacts with the browser, and to further manipulate those registered behaviors.
2 votes
1k views

HTML Select

This HTML element defines a selection list within a form.