All You Can Do With: Select

W3 Org on Select,Optgroup and Option
Not showing in this AYCD page.
  1. You will need a Name="SomeFormName" for your form to pass the data to your solution.
  2. tabindex is available to control the tab order.(tabindex="5" {index order number}).
  3. JavaScript
    • onclick
    • ondblclick
    • onmousedown
    • onmouseup
    • onmouseover
    • onmousemove
    • onmousemove
    • onmouseout
    • onkeypress
    • onkeydown< LI>onkeyup

Basic
<Select>
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Size
<Select Size="3">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Multiple Selections
<Select Multiple Size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Option Groups
<Select>
<OPTGROUP Label="Citrus">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</OPTGROUP>
<OPTGROUP Label="Apples">
<Option>Golden Delicious
<Option>McIntosh
<Option>Granny Smith
<Option>Jonathan
<Option>Red Delicious
<Option>Rome Beauty
</OPTGROUP>
</Select>

Readonly

This doesn't seem to work (IE)


<Select Readonly>
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Disabled
<Select disabled>
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Accesskey
<Select accesskey="T">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Notes: On machines running MS Windows, press the "alt" key in addition to the access key. On Macintosh systems, press the "cmd" key in addition to the access key.


This is the CSS for TextArea.

Background Image
<Select style="background: url('images/box_aqua_bg.gif');">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Color
<Select style="background-color: lightyellow;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Transparent
<Select style="background-color: Transparent;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Did this by adding a background image to the enclosing div tag.

Image Repeat-X
<Select style="background: url('images/box_aqua_bg.gif'); background-repeat: repeat-x;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Image Repeat-Y
<Select style="background: url('images/box_aqua_bg.gif'); background-repeat: repeat-y;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Image no-repeat
<Select style="background: url('images/box_aqua_bg.gif'); background-repeat: no-repeat;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Image Repeat
<Select style="background: url('images/box_aqua_bg.gif'); background-repeat: repeat;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Image Attachment Scroll
<Select style="background: url('images/box_aqua_bg.gif'); background-attachment: scroll;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Image Attachment Fixed
<Select style="background: url('images/box_aqua_bg.gif'); background-attachment: fixed;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Border Border Color
<Select style="background: url('images/box_aqua_bg.gif'); border-color: lightgreen;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

These work too:


Border width
<Select style="border-width: 4px;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

These work too:


Border style
<Select style="border-style: dotted;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:

These work too:


Color Color: Text forground

<Select style="color: red;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Cursor Cursor

<Select style="Cursor: crosshair;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Direction Direction

<Select style="direction: rtl;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Display Display
CSS Display is being evealuated for implementation on this page.
Float Float- right
Example Static test that just runs on and on and repeats it-self until it can display the intended example.Example Static test that just runs on and on and repeats it-self until it can display the intended example.Example Static test that just runs on and on and repeats it-self until it can display the intended example.Example Static test that just runs on and on and repeats it-self until it can display the intended example.Example Static test that just runs on and on and repeats it-self until it can display the intended example.Example Static test that just runs on and on and repeats it-self until it can display the intended example.Example Static test that just runs on and on and repeats it-self until it can display the intended example.
<Select style="float: right;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select> Example Static test that just runs on and on and repeats it-self until it can display the intended example.
Float- left
Example Static test that just runs on and on and repeats it-self until it can display the intended example. Example Static test that just runs on and on and repeats it-self until it can display the intended example. Example Static test that just runs on and on and repeats it-self until it can display the intended example.
<Select style="float: left;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>Example Static test that just runs on and on and repeats it-self until it can display the intended example.
Float- none
Example Static test that just runs on and on and repeats it-self until it can display the intended example. Example Static test that just runs on and on and repeats it-self until it can display the intended example. Example Static test that just runs on and on and repeats it-self until it can display the intended example.
<Select style="float: none;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>Example Static test that just runs on and on and repeats it-self until it can display the intended example.

Font Font-bold
Font Example:
Font Example: <Select style="font: bold;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-italic
Font Example:
Font Example: <Select style="font: italic;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-oblique
Font Example:
Font Example: <Select style="font: oblique;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-small-caps
Font Example:
Font Example: <Select style="font: small-caps;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-caption
Font Example:
Font Example: <Select style="font: caption;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-icon
Font Example:
Font Example: <Select style="font: icon;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-menu
Font Example:
Font Example: <Select style="font: menu;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-message-box
Font Example:
Font Example: <Select style="font: message-box;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-small-caption
Font Example:
Font Example: <Select style="font: small-caption;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-status-bar
Font Example:
Font Example: <Select style="font: status-bar;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-(size 9pt)
Font Example:
Font Example: <Select style="font: 9pt;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-(size 14pt)
Font Example:
Font Example: <Select style="font: 14pt;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options: Number limits are different for every Browser.


Font-(size/hight 10pt/20pt)
Font Example:
Font Example: <Select style="font: 10pt/20pt;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-(size/hight 14pt/28pt)
Font Example:
Font Example: <Select style="font: 14pt/28pt;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options: Number limits are different for every Browser.


Font-(famliy Arial)
Font Example:
Font Example: <Select style="font: Arial;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-(famliy Helvetica)
Font Example:
Font Example: <Select style="font: Helvetica;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Font-(famliy Times)
Font Example:
Font Example: <Select style="font: Times;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Font-Family Font-Family Times
Font Example:
Font Example: <Select style="font-family: Times;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are some options:


Font-Family Font-Size
Font Example:
Font Example: <Select style="font-size: large;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Font-Stretch Font-Stretch
Font Example:
Font Example: <Select style="font-stretch: ultra-condensed;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Font-Style Font-Style
Font Example:
Font Example: <Select style="font-style: normal;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Font-Variant Font-Variant
Font Example:
Font Example: <Select style="font-variant: small-caps;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Font-Weight Font-Weight
Font Example:
Font Example: <Select style="font-weight: 700;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Font-Height Font-Height
Font Example:
Font Example: <Select style="font-height: 24px;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Letter Spacing Letter-Spacing (Kerning)
Letter Spacing Example:
Letter Spacing Example: <Select style="letter-spacing: 10px;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Line Height Line-Height (leading)
Line Height Example:
Line Height Example: <Select style="line-height: 20px;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Margin Margin
Margin Example:
Margin Example: <Select style="margin-top: 20px;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Overflow overflow
Overflow Example:
Overflow Example: <Select style="overflow: hidden;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Overflow Example:
Overflow Example: <Select style="overflow: visible;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Overflow Example:
Overflow Example: <Select style="overflow: scroll;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Padding padding
Padding Example:
Padding Example: <Select style="padding: 12px;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Position position
Position Example:
Position Example: <Select style="position: relative; top:-50; left:5;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Scrollbar scrollbar
Scrollbar 3D Light Color Example:
Scrollbar 3D Light Color Example: <Select style="scrollbar-3dlight-color:red;" size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Scrollbar Arrow Color Example:
Scrollbar Arrow Color Example: <Select style="scrollbar-arrow-color:blue;" size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Scrollbar Base Color Example:
Scrollbar Base Color Example: <Select style="scrollbar-base-color:blue;" size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Scrollbar darkshadow Color Example:
Scrollbar darkshadow Color Example: <Select style="scrollbar-darkshadow-color:blue;" size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Scrollbar Face Color Example:
Scrollbar Face Color Example: <Select style="scrollbar-face-color:blue;" size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Scrollbar Highlight Color Example:
Scrollbar Highlight Color Example: <Select style="scrollbar-highlight-color:blue;" size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Scrollbar Shadow Color Example:
Scrollbar Shadow Color Example: <Select style="scrollbar-shadow-color:blue;" size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Scrollbar Track Color Example:
Scrollbar Track Color Example: <Select style="scrollbar-track-color:blue;" size="5">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Text Align text align
Text Align Example:
Text Align Example: <Select style="text-align: right;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Text Align Example:
Text Align Example: <Select style="text-align: center;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Text Align Example:
Text Align Example: <Select style="text-align: justify;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Text Decoration text decoration
Text Decoration Example:
Text Decoration Example: <Select style="text-decoration: line-through;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Text Decoration Example:
Text Decoration Example: <Select style="text-decoration: underline;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Text Decoration Example:
Text Decoration Example: <Select style="text-decoration: blink;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Text Indent text indent
Text Indent Example:
Text Indent Example: <Select style="text-indent: 100px;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Text Justify text justify
Text Justify Example:
Text Justify Example: <Select style="text-justify: newspaper;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Text Shadow text shadow
Text Shadow Example:
Text Shadow Example: <Select style="text-shadow: blue;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Text Transform text transform
Text Transform Example:
Text Transform Example: <Select style="text-transform: uppercase;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Text Underline Position text underline position
Text Underline Position Example:
Text Underline Position Example: <Select style="text-underline-position: above;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Vertical Align vertical align
Vertical Align Example:
Vertical Align Example: <Select style="vertical-align: top;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Vertical Align Example:
Vertical Align: <Select style="vertical-align: middle;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Vertical Align Example:
Vertical Align Example: <Select style="vertical-align: bottom;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Visibility visibility
Visibility Example:
Visibility Example: <Select style="visibility: hidden;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


White Space white space
White Space Example:
White Space Example: <Select style="white-space: nowrap;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Word Spacing word spacing
Word Spacing Example:
Word Spacing Example: <Select style="word-spacing: -5px;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Word Wrap word wrap
Word Wrap Example:
Word Wrap Example: <Select style="word-wrap: break-word;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>
Word Wrap Example:
Word Wrap Example: <Select style="word-wrap: normal;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options:


Zoom zoom
Zoom Example:
Zoom Example: <Select style="zoom: 50%;">
<Option>Orange
<Option Selected>Lime
<Option>Lemon
<Option>Grapefruit
<Option>Navel Orange
<Option>Meyers Lemon
</Select>

Here are the options: