書式
<optgroup>〜</optgroup>
属性
属性名 |
初期値 |
内 容 |
id |
なし |
IDを指定します。 |
class |
なし |
スタイルシートクラスを指定します。 |
style |
なし |
スタイルシートを指定します。 |
name |
なし |
名前を指定します。 |
value |
なし |
送信される際の送信内容を指定します。 |
label |
なし |
グループ名を指定します。 |
説明
入力フォームのメニューの選択項目のグループを指定します。
<!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="デザート">
<optgroup label="果物">
<option>りんご</option>
<option>ぶどう</option>
<option>洋なし</option>
</optgroup>
<optgroup label="洋菓">
<option>ケーキ</option>
<option>プリン</option>
</optgroup>
</select>
</form>
</body>
</html>