<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1>optgroup 要素型 (HTML, XHTML 1)</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML</anchor> の <dfn><code class="HTMLe">optgroup</code> 要素型</dfn>の要素は、
メニュー制御子 (<code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">select</anchor></code> 要素) の選択肢を集団化します。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> 仕様書:<ul><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML 4</anchor> (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web Forms 1.0</anchor>)<ul><li><cite>menus</cite>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;interact/forms.html#menu&quot;">IW:HTML4:&quot;interact/forms.html#menu&quot;</anchor-external></li><li><cite>17.6 The <code class="HTMLe">SELECT</code>, <code class="HTMLe">OPTGROUP</code>, and <code class="HTMLe">OPTION</code> elements</cite>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;interact/forms.html#edef-OPTGROUP&quot;">IW:HTML4:&quot;interact/forms.html#edef-OPTGROUP&quot;</anchor-external></li><li><cite>A.1.2 Errors that were corrected</cite>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;appendix/changes.html#h-A.1.2&quot;">IW:HTML4:&quot;appendix/changes.html#h-A.1.2&quot;</anchor-external></li></ul></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web Forms 2.0</anchor><ul><li><csection xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en">2.3. Changes to existing controls</csection>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="WF2:&quot;#changes&quot;">IW:WF2:&quot;#changes&quot;</anchor-external></li><li><csection xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en">2.18. Handling unexpected elements and values</csection>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="WF2:&quot;#handling&quot;">IW:WF2:&quot;#handling&quot;</anchor-external></li></ul></li></ul></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <dl><dt>状態</dt><dd><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">W3C</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">勧告</anchor></dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名前空間URI</anchor></dt><dd><code class="URI" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">http://www.w3.org/1999/xhtml</anchor></code></dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">局所名</anchor></dt><dd><code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code>
(<q xml:lang="en"><rubyb xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">選択肢群<rt xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">option group</rt></rubyb></q>より)</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">開始タグ</anchor></dt><dd>必須</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">終了タグ</anchor></dt><dd>必須</dd><dt>出現できる文脈</dt><dd>
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">select</anchor></code> または
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code>
の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">子供</anchor>として</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">内容モデル</anchor></dt><dd>
<code class="SGML" xml:lang="en">(<code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">option</anchor></code> | <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code>)*</code></dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">属性</anchor></dt><dd><table><tbody><tr><td>属性名</td><td>属性値</td><td>既定値</td><td>説明</td><td>出典</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">class</anchor></code></td><td></td><td>(なし)</td><td><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">級</anchor></td><td>[HTML 4] %<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">coreattrs</anchor> ⊂ %<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attrs</anchor>, [XHTML 1] <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Core</anchor> ⊂ <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Common</anchor></td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">dir</anchor></code></td><td></td><td></td><td><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">書字方向</anchor></td><td>[HTML 4] %<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">i18n</anchor> ⊂ %attrs, [XHTML 1] <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">I18N</anchor> ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">disabled</anchor></code></td><td>(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">真偽値属性</anchor>)</td><td>(偽)</td><td>無効</td><td>[HTML 4]</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">id</anchor></code></td><td><code class="SGML"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ID</anchor></code></td><td>(なし)</td><td>一意識別子</td><td>[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] Core ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">label</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Text</anchor></code></td><td>(必須)</td><td>階層名</td><td>[HTML 4]</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">lang</anchor></code></td><td></td><td></td><td><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">自然言語</anchor></td><td>[HTML 4] %i18n ⊂ %attrs</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">xml</anchor>:lang</code></td><td></td><td></td><td>自然言語</td><td>[XHTML 1] I18N ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onclick</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">events</anchor> ⊂ %attrs, [XHTML 1] <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Events</anchor> ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ondblclick</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onkeydown</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onkeypress</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onkeyup</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onmousedown</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onmousemove</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onmouseout</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onmouseover</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">onmouseup</anchor></code></td><td><code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Script</anchor></code></td><td>(なし)</td><td></td><td>[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">style</anchor></code></td><td></td><td></td><td>スタイル情報</td><td>[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Style</anchor> ⊂ Common</td></tr><tr><td><code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">title</anchor></code></td><td></td><td></td><td>注釈的題</td><td>[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] Core ⊂ Common</td></tr></tbody></table></dd></dl></p><section><h1>内容</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <code class="HTMLe">optgroup</code> 要素の子供には、選択肢である
<code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">option</anchor></code> 要素を配置できます。</p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section><section><h1>空要素</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML 4</anchor> では、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">子要素</anchor>として <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">option</anchor></code>
が1つ以上必要でした。 <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en">HTML 4 17.6.1</src></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web Forms 2.0</anchor> では、この制限が撤廃され、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">空</anchor>に<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">して構いません</strong></anchor>。
ただし、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者</anchor>の混乱を防ぐため、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">著者</anchor>は <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code>
を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">空</anchor>かつ可視のままに<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">するべきではありません</strong></anchor>。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en">WF2 2.3</src></p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form><section><h1>入れ子</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web Forms 2.0</anchor> によれば、
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code>
内に <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code>
を入れることができます。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en">WF2 2.3</src></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML 4</anchor> では <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code> を 
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code>
の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">子供</anchor>にすることはできませんでしたが、
将来<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">入れ子</anchor>にできるようになるかもしれないと実装者に注意が促されていました。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML 4</anchor> 17.6.1</src></p></section><section><h1>メモ</h1><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section></section><section><h1>レンダリング</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> 視覚 UA は、階層構造を階層メニューその他の構造を反映した方法でレンダリングして構いません
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">HTML 4 17.6.1</src>。</p><p>実際のレンダリングには、
その環境で一般的なメニューのレンダリング形式を踏襲するのが良いでしょう。
例えば、多くの GUI システムではメニューを階層化して表示できます。
<code class="HTMLe">optgroup</code> の部分を下位メニューとすれば、
選択肢の多いメニューでもすっきりするかもしれません。</p><p>また、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">TreeView</anchor> control のような表現も考えられるでしょう。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <strong>誤り処理</strong></p><p><code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要素</anchor>内で
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">select</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要素</anchor>における役割を果たすのは
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">option</anchor></code> と
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">optgroup</anchor></code> だけで、
その他の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">子供節点</anchor>は、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">スタイル・シート</anchor>で特に指定されない限り、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">レンダリング</anchor>されません。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en">WF2 2.18</src></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <strong><code class="HTMLe" xml:lang="en">select</code> 外</strong></p><p><code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">select</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要素</anchor>外の
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">option</anchor></code> は、
<code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">span</anchor></code> と同じように<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">レンダリング</anchor><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">するべきです</strong></anchor>。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:" xml:lang="en">WF2 2.18</src></p></section></section><section><h1>歴史</h1><section><h1>HTML4</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[18]</anchor-end> <cite xml:lang="en">Forms in HTML documents</cite>, <time>2013-05-28T21:39:05.000Z</time>, <time>2024-10-11T13:50:58.903Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://www.w3.org/TR/PR-html40-971107/interact/forms.html#h-17.3.3">https://www.w3.org/TR/PR-html40-971107/interact/forms.html#h-17.3.3</anchor-external></p><figure class="data"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="19" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[19]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML要素概説</anchor></figcaption><dl><dt><f xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要素名</f></dt><dd><code>optgroup</code></dd><dt>日付</dt><dd><time>1997-11-07</time></dd><dt>説明</dt><dd>
<time>1997-11-07</time>、
<cite>HTML 4.0</cite>
に
<code>optgroup</code>
が追加された。</dd><dt>出典</dt><dd><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li>
<dfn>HTML4-19971107:forms</dfn>:
<cite xml:lang="en">Forms in HTML documents</cite>, 
<data itemprop="author"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">W3C</anchor></data>,
<time itemprop="published">1997-11-07</time>,
<time>2013-05-28T21:39:05.000Z</time>, <time>2024-10-11T13:50:58.903Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://www.w3.org/TR/PR-html40-971107/interact/forms.html#h-17.3.3">https://www.w3.org/TR/PR-html40-971107/interact/forms.html#h-17.3.3</anchor-external></li></ul></refs></dd></dl></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> 階層メニューの例 <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">HTML 4 17.6.1</src><pre class="HTML">&lt;FORM action=&quot;http://somesite.com/prog/someprog&quot; method=&quot;post&quot;&gt;
 &lt;P&gt;
 &lt;SELECT name=&quot;ComOS&quot;&gt;
     &lt;OPTION selected label=&quot;none&quot; value=&quot;none&quot;&gt;None&lt;/OPTION&gt;
     &lt;OPTGROUP label=&quot;PortMaster 3&quot;&gt;
       &lt;OPTION label=&quot;3.7.1&quot; value=&quot;pm3_3.7.1&quot;&gt;PortMaster 3 with ComOS 3.7.1&lt;/OPTION&gt;
       &lt;OPTION label=&quot;3.7&quot; value=&quot;pm3_3.7&quot;&gt;PortMaster 3 with ComOS 3.7&lt;/OPTION&gt;
       &lt;OPTION label=&quot;3.5&quot; value=&quot;pm3_3.5&quot;&gt;PortMaster 3 with ComOS 3.5&lt;/OPTION&gt;
     &lt;/OPTGROUP&gt;
     &lt;OPTGROUP label=&quot;PortMaster 2&quot;&gt;
       &lt;OPTION label=&quot;3.7&quot; value=&quot;pm2_3.7&quot;&gt;PortMaster 2 with ComOS 3.7&lt;/OPTION&gt;
       &lt;OPTION label=&quot;3.5&quot; value=&quot;pm2_3.5&quot;&gt;PortMaster 2 with ComOS 3.5&lt;/OPTION&gt;
     &lt;/OPTGROUP&gt;
     &lt;OPTGROUP label=&quot;IRX&quot;&gt;
       &lt;OPTION label=&quot;3.7R&quot; value=&quot;IRX_3.7R&quot;&gt;IRX with ComOS 3.7R&lt;/OPTION&gt;
       &lt;OPTION label=&quot;3.5R&quot; value=&quot;IRX_3.5R&quot;&gt;IRX with ComOS 3.5R&lt;/OPTION&gt;
     &lt;/OPTGROUP&gt;
 &lt;/SELECT&gt;
&lt;/FORM&gt;</pre></p><p>この例では、選択肢は次のような階層構造になっています。<ul><li><samp>None</samp></li><li><samp>PortMaster 3</samp><ul><li><samp>3.7.1</samp></li><li><samp>3.7</samp></li><li><samp>3.5</samp></li></ul></li><li><samp>PortMaster 2</samp><ul><li><samp>3.7</samp></li><li><samp>3.5</samp></li></ul></li><li><samp>IRX</samp><ul><li><samp>3.7R</samp></li><li><samp>3.5R</samp></li></ul></li></ul></p><p>レンダリング例: <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;images/optgroup_exmpl.gif&quot;">IW:HTML4:&quot;images/optgroup_exmpl.gif&quot;</anchor-external></p><p>このレンダリング例では、階層構造をそのまま <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">GUI</anchor> の階層メニューに写像しています。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="20" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[20]</anchor-end> <cite>Optgroup</cite>, <time>2005-03-21T01:56:42.000Z</time>, <time>2024-10-11T13:54:05.919Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.blooberry.com/indexdot/html/tagpages/o/optgroup.htm">http://www.blooberry.com/indexdot/html/tagpages/o/optgroup.htm</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="21" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[21]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">IE6</anchor>+ とのこと (不具合もあった) <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="20" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;20</anchor-internal></src> </p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="28" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[28]</anchor-end>
<cite xml:lang="zh-TW">求助!人生第一次背包畢業旅行!需要&amp;#24171;忙~~ - 台灣綜合</cite> (<time>2008-06-21 21:08:05 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.backpackers.com.tw/forum/showthread.php?s=015c15c6ce5789f6840e58422e1a6268&amp;t=53965">http://www.backpackers.com.tw/forum/showthread.php?s=015c15c6ce5789f6840e58422e1a6268&amp;t=53965</anchor-external></p><blockquote><pre class="HTML example code">			&lt;select name=&quot;langid&quot; onchange=&quot;switch_id(this, 'lang')&quot;&gt;
				&lt;optgroup label=&quot;快速語系選擇器&quot;&gt;
					&lt;option value=&quot;3&quot; class=&quot;&quot; &gt;-- English&lt;/option&gt;
&lt;option value=&quot;1&quot; class=&quot;&quot; &gt;-- 簡體中文&lt;/option&gt;
&lt;option value=&quot;2&quot; class=&quot;&quot; selected=&quot;selected&quot;&gt;-- 繁體中文&lt;/option&gt;

				&lt;/optgroup&gt;
			&lt;/select&gt;</pre></blockquote><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="27" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[27]</anchor-end>
<cite xml:lang="ja">optgroup 要素を CSS でひと工夫してみる | WWW WATCH</cite> (<code>2007-05-11 19:54:58 +09:00</code> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://hyper-text.org/archives/2007/05/optgroup_css.shtml">http://hyper-text.org/archives/2007/05/optgroup_css.shtml</anchor-external>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor> <weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">2007-05-11 10:58:06 +00:00</weak>)</p></section><section><h1>HTML5</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="71" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[71]</anchor-end> 
<cite xml:lang="en"><strong>[</strong><strong>]</strong> (0) WF2: &lt;optgroup&gt; element summary.</cite>, <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Hixie</anchor>, <time>2008-09-04 20:11:08 +09:00</time>, <time>2024-09-04T13:09:15.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/html/commit/2984402d970c550bd1508336217345917126a7cc">https://github.com/whatwg/html/commit/2984402d970c550bd1508336217345917126a7cc</anchor-external></p><figure class="data"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="70" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[70]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML要素概説</anchor></figcaption><dl><dt><f xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要素名</f></dt><dd><code>optgroup</code></dd><dt>日付</dt><dd><time>2008-09-04</time></dd><dt>説明</dt><dd>
<time>2008-09-04</time>、
<cite>HTML5</cite>
に
<code>optgroup</code>
が追加された。</dd><dt>出典</dt><dd><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li>
<cite>HTML5 r2151</cite>,
<data itemprop="author"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Hixie</anchor></data>, 
<time itemprop="published">2008-09-04 20:11:08 +09:00</time>, <time>2024-09-04T13:09:15.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/html/commit/2984402d970c550bd1508336217345917126a7cc">https://github.com/whatwg/html/commit/2984402d970c550bd1508336217345917126a7cc</anchor-external></li></ul></refs></dd></dl></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="29" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[29]</anchor-end> <cite><strong>[</strong>whatwg<strong>]</strong> Browser inconsistencies in rendering &lt;optgroup&gt; and &lt;option&gt;</cite>
(<time>2010-10-23 12:58:06 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-October/028882.html">http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-October/028882.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="30" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[30]</anchor-end> <cite xml:lang="en">Web Applications 1.0 r8611 Add some explanatory notes to &lt;optgroup&gt;</cite>
( (<time>2014-05-08 06:07:00 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://html5.org/tools/web-apps-tracker?from=8610&amp;to=8611">http://html5.org/tools/web-apps-tracker?from=8610&amp;to=8611</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> <cite xml:lang="en">1214164 – Only &lt;options&gt; that are children of &lt;select&gt; or children of &lt;optgroup&gt; children of &lt;select&gt; should be honored</cite>
(<time>2015-11-06 18:09:53 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://bugzilla.mozilla.org/show_bug.cgi?id=1214164">https://bugzilla.mozilla.org/show_bug.cgi?id=1214164</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <cite>html5 - Why does IE10's input validation fail for this required select &amp; optgroup structure - Stack Overflow</cite>
( (<time>2016-06-17 12:53:24 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://stackoverflow.com/questions/15821267/why-does-ie10s-input-validation-fail-for-this-required-select-optgroup-struct">http://stackoverflow.com/questions/15821267/why-does-ie10s-input-validation-fail-for-this-required-select-optgroup-struct</anchor-external></figcaption><blockquote><p>value=&quot;0&quot; on the optgroup elements did the trick with my issue too. </p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <cite xml:lang="en">Editorial: Cross-reference DOM &quot;child&quot; where appropriate in rendering</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">zcorpan</anchor>著, <time>2016-09-20 20:16:41 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/html/commit/e8c91c05edc8d6cdb33fdd5452e052359d40490b">https://github.com/whatwg/html/commit/e8c91c05edc8d6cdb33fdd5452e052359d40490b</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> <cite>WAI-HC SELECT grouping proposal</cite>
(<time>2017-05-23 00:43:50 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://www.w3.org/WAI/PF/select-proposal.html">https://www.w3.org/WAI/PF/select-proposal.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> <cite>HTML4/CSS2 Accessibility Recommendations</cite>
(<time>2017-05-23 00:44:21 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://www.w3.org/WAI/PF/guide.html#OPTION">https://www.w3.org/WAI/PF/guide.html#OPTION</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[17]</anchor-end> <cite xml:lang="en">Clarify disabled for option/optgroup is defined separately</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">annevk</anchor>著, <time>2018-01-29 03:15:17 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/html/commit/8d60f070d6ba6b5c7dfbc116fd9d3faee5d9c96e">https://github.com/whatwg/html/commit/8d60f070d6ba6b5c7dfbc116fd9d3faee5d9c96e</anchor-external></p></section></section></body></html>