Glubase - share your knowledge


All / Computers / Programming / HTML / XHTML





  • View Command

HTML / XHTML Reference

HTML / XHTML option definition

Syntax

<option> ... </option>

Description

Defines an option in a drop-down list.

Attributes

Attribute Description
selected Sets this option to be selected when the page is loaded.
disabled Disables the option.
value = cdata The value that is sent to the server on submit.
label = text  

Common attributes.

Example

[Try this example yourself]
<select>
  <option value="html">HTML</option>
  <option value="php" selected="selected">PHP</option>
  <option value="javascript">JavaScript</option>
</select>

Output

  • Comments

No comments added.