Form
<option> ... </option>
Attributes
attribute |
default |
description |
id |
none |
specifies the unique ID |
class |
none |
specifies the style sheet class |
style |
none |
specifies the style sheet |
name |
none |
specifies the name |
value |
none |
specifies the value of the option to be sent to the server |
label |
none |
spedifies the lavel for the option |
disabled |
--- |
specifies that a pull-down menu is disabled |
selected |
--- |
specifies that the option is initially selected |
Explanation
The option tag specifies option items of the menu in a input form. Specify the selected attribute that makes a option item be initially selected.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
</head>
<body>
<h1>Sample</h1>
<form method="get" action="../bbs.cgi">
<select name="Fruits">
<option>Apple</option>
<option>Grape</option>
<option>Pear</option>
</select>
</form>
</body>
</html>