メインコンテンツへスキップ

option要素


1.仕様

OPTION要素は、
select要素内のオプション、
または
datalist要素内の提案リストの
一部としてのオプションを
表します。

option

選択可能な選択肢 (selectable choice)

種類

通常要素

カテゴリ

なし

使用できるコンテキスト
  • select要素
  • datalist要素
  • optgroup要素



コンテンツモデル
テキスト

テキストが配置できます。

テキストに分類される要素は、 です。

要素に label属性と value属性がある場合は、Nothing

要素に label属性はあるが value属性がない場合は、テキスト

要素に label属性がなく、datalist要素の子ではない場合は、要素間の空白ではないテキスト

要素に label属性がなく、datalist要素の子の場合は、テキスト

タグの省略
終了タグは省略できます。

option要素の直後に別のoption要素が続く場合、その直後に optgroup要素が続く場合、直後に hr要素が続く場合、または親要素にそれ以上のコンテンツがない場合、option要素の終了タグは省略できます。

コンテンツ属性
グローバル属性 他
disabled属性
フォームコントロールが無効かどうか
label属性
ユーザーに見えるラベル
selected属性
オプションがデフォルトで選択されているかどうか
value属性
フォーム送信に使用される値
DOM インターフェイス
HTMLOptionElement
  1. [Exposed=Window, LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)]
  2. interface HTMLOptionElement : HTMLElement {
  3. [HTMLConstructor] constructor();
  4.  
  5. [CEReactions] attribute boolean disabled;
  6. readonly attribute HTMLFormElement? form;
  7. [CEReactions] attribute DOMString label;
  8. [CEReactions] attribute boolean defaultSelected;
  9. attribute boolean selected;
  10. [CEReactions] attribute DOMString value;
  11.  
  12. [CEReactions] attribute DOMString text;
  13. readonly attribute long index;
  14. };
HTMLElement
  1. [Exposed=Window]
  2. interface HTMLElement : Element {
  3. [HTMLConstructor] constructor();
  4.  
  5. // metadata attributes
  6. [CEReactions] attribute DOMString title;
  7. [CEReactions] attribute DOMString lang;
  8. [CEReactions] attribute boolean translate;
  9. [CEReactions] attribute DOMString dir;
  10.  
  11. // user interaction
  12. [CEReactions] attribute (boolean or unrestricted double or DOMString)? hidden;
  13. [CEReactions] attribute DOMString inert;
  14. undefined click();
  15. [CEReactions] attribute DOMString accessKey;
  16. readonly attribute DOMString accessKeyLabel;
  17. [CEReactions] attribute boolean draggable;
  18. [CEReactions] attribute boolean spellcheck;
  19. [CEReactions] attribute DOMString writingSuggestions;
  20. [CEReactions] attribute DOMString autocapitalize;
  21.  
  22. [CEReactions] attribute [LegacyNullToEmptyString] DOMString innerText;
  23. [CEReactions] attribute [LegacyNullToEmptyString] DOMString outerText;
  24.  
  25. ElementInternals attachInternals();
  26.  
  27. // The popover API
  28. undefined showPopover();
  29. undefined hidePopover();
  30. boolean togglePopover(optional boolean force);
  31. [CEReactions] attribute DOMString? popover;
  32. };
  33.  
  34. HTMLElement includes GlobalEventHandlers;
  35. HTMLElement includes ElementContentEditable;
  36. HTMLElement includes HTMLOrSVGElement;
Element
  1. [Exposed=Window]
  2. interface Element : Node {
  3. readonly attribute DOMString? namespaceURI;
  4. readonly attribute DOMString? prefix;
  5. readonly attribute DOMString localName;
  6. readonly attribute DOMString tagName;
  7.  
  8. [CEReactions] attribute DOMString id;
  9. [CEReactions] attribute DOMString className;
  10. [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
  11. [CEReactions, Unscopable] attribute DOMString slot;
  12.  
  13. boolean hasAttributes();
  14. [SameObject] readonly attribute NamedNodeMap attributes;
  15. sequence<DOMString> getAttributeNames();
  16. DOMString? getAttribute(DOMString qualifiedName);
  17. DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
  18. [CEReactions] undefined setAttribute(DOMString qualifiedName, DOMString value);
  19. [CEReactions] undefined setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value);
  20. [CEReactions] undefined removeAttribute(DOMString qualifiedName);
  21. [CEReactions] undefined removeAttributeNS(DOMString? namespace, DOMString localName);
  22. [CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
  23. boolean hasAttribute(DOMString qualifiedName);
  24. boolean hasAttributeNS(DOMString? namespace, DOMString localName);
  25.  
  26. Attr? getAttributeNode(DOMString qualifiedName);
  27. Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
  28. [CEReactions] Attr? setAttributeNode(Attr attr);
  29. [CEReactions] Attr? setAttributeNodeNS(Attr attr);
  30. [CEReactions] Attr removeAttributeNode(Attr attr);
  31.  
  32. ShadowRoot attachShadow(ShadowRootInit init);
  33. readonly attribute ShadowRoot? shadowRoot;
  34.  
  35. Element? closest(DOMString selectors);
  36. boolean matches(DOMString selectors);
  37. boolean webkitMatchesSelector(DOMString selectors); // legacy alias of .matches
  38.  
  39. HTMLCollection getElementsByTagName(DOMString qualifiedName);
  40. HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
  41. HTMLCollection getElementsByClassName(DOMString classNames);
  42.  
  43. [CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // legacy
  44. undefined insertAdjacentText(DOMString where, DOMString data); // legacy
  45. };
GlobalEventHandlers
  1. interface mixin GlobalEventHandlers {
  2. attribute EventHandler onabort;
  3. attribute EventHandler onauxclick;
  4. attribute EventHandler onbeforeinput;
  5. attribute EventHandler onbeforematch;
  6. attribute EventHandler onbeforetoggle;
  7. attribute EventHandler onblur;
  8. attribute EventHandler oncancel;
  9. attribute EventHandler oncanplay;
  10. attribute EventHandler oncanplaythrough;
  11. attribute EventHandler onchange;
  12. attribute EventHandler onclick;
  13. attribute EventHandler onclose;
  14. attribute EventHandler oncontextlost;
  15. attribute EventHandler oncontextmenu;
  16. attribute EventHandler oncontextrestored;
  17. attribute EventHandler oncopy;
  18. attribute EventHandler oncuechange;
  19. attribute EventHandler oncut;
  20. attribute EventHandler ondblclick;
  21. attribute EventHandler ondrag;
  22. attribute EventHandler ondragend;
  23. attribute EventHandler ondragenter;
  24. attribute EventHandler ondragleave;
  25. attribute EventHandler ondragover;
  26. attribute EventHandler ondragstart;
  27. attribute EventHandler ondrop;
  28. attribute EventHandler ondurationchange;
  29. attribute EventHandler onemptied;
  30. attribute EventHandler onended;
  31. attribute OnErrorEventHandler onerror;
  32. attribute EventHandler onfocus;
  33. attribute EventHandler onformdata;
  34. attribute EventHandler oninput;
  35. attribute EventHandler oninvalid;
  36. attribute EventHandler onkeydown;
  37. attribute EventHandler onkeypress;
  38. attribute EventHandler onkeyup;
  39. attribute EventHandler onload;
  40. attribute EventHandler onloadeddata;
  41. attribute EventHandler onloadedmetadata;
  42. attribute EventHandler onloadstart;
  43. attribute EventHandler onmousedown;
  44. [LegacyLenientThis] attribute EventHandler onmouseenter;
  45. [LegacyLenientThis] attribute EventHandler onmouseleave;
  46. attribute EventHandler onmousemove;
  47. attribute EventHandler onmouseout;
  48. attribute EventHandler onmouseover;
  49. attribute EventHandler onmouseup;
  50. attribute EventHandler onpaste;
  51. attribute EventHandler onpause;
  52. attribute EventHandler onplay;
  53. attribute EventHandler onplaying;
  54. attribute EventHandler onprogress;
  55. attribute EventHandler onratechange;
  56. attribute EventHandler onreset;
  57. attribute EventHandler onresize;
  58. attribute EventHandler onscroll;
  59. attribute EventHandler onscrollend;
  60. attribute EventHandler onsecuritypolicyviolation;
  61. attribute EventHandler onseeked;
  62. attribute EventHandler onseeking;
  63. attribute EventHandler onselect;
  64. attribute EventHandler onslotchange;
  65. attribute EventHandler onstalled;
  66. attribute EventHandler onsubmit;
  67. attribute EventHandler onsuspend;
  68. attribute EventHandler ontimeupdate;
  69. attribute EventHandler ontoggle;
  70. attribute EventHandler onvolumechange;
  71. attribute EventHandler onwaiting;
  72. attribute EventHandler onwebkitanimationend;
  73. attribute EventHandler onwebkitanimationiteration;
  74. attribute EventHandler onwebkitanimationstart;
  75. attribute EventHandler onwebkittransitionend;
  76. attribute EventHandler onwheel;
  77. };
ElementContentEditable
  1. interface mixin ElementContentEditable {
  2. [CEReactions] attribute DOMString contentEditable;
  3. [CEReactions] attribute DOMString enterKeyHint;
  4. readonly attribute boolean isContentEditable;
  5. [CEReactions] attribute DOMString inputMode;
  6. };
HTMLOrSVGElement
  1. interface mixin HTMLOrSVGElement {
  2. [SameObject] readonly attribute DOMStringMap dataset;
  3. attribute DOMString nonce; // intentionally no [CEReactions]
  4.  
  5. [CEReactions] attribute boolean autofocus;
  6. [CEReactions] attribute long tabIndex;
  7. undefined focus(optional FocusOptions options = {});
  8. undefined blur();
  9. };
ARIA in HTML
暗黙的="option" ARIAロール="No" aria-* 属性="GlobalAny"

暗黙的な ARIAセマンティクスは、role=option です。

作成者は、暗黙的な ARIAセマンティクス, または HTML要素のネイティブセマンティクスを上書きしてはいけません。

グローバル aria-* 属性と、許可されたロールに適用される任意の aria-* 属性が記述できます。
作者はoption要素にaria-selected属性を使うべきではありません。

レンダリング
特になし
  1. option: Nothing;

CSS を大雑把に読むと、 特に指定はされていません。既定値から、フローレイアウトに配置されたときにインラインレベルのボックス(インラインボックス)を生成すると思われます。 などになります。

説明
option要素は、select要素内のオプション、または datalist要素内の提案リストの一部としてのオプションを表します。
  1. <!DOCTYPE html>
  2. <html lang="ja">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>option要素の例 - (Example of option element) | 離珠のHTMLでしぃ!</title>
  6. </head>
  7. <body>
  8. <h1>option要素の例</h1>
  9. <form action="../Html/fmreceive.htm">
  10. <select name="nseSelect">
  11. <option>ABC123</option>
  12. <option>DEF456</option>
  13. </select>
  14. <button name="nbtSender" value="../Html/exoption.htm">ボタン</button>
  15. <br>受信用の<br>ページへ
  16. </form>
  17. </body>
  18. </html>

このサンプルへのリンクです。
(./exoption.htm)

JSONデータ
JSON形式での、データのイメージです。
  1. {
  2. "option": {
  3. "check": "2024-09-01",
  4. "group": "Form",
  5. "element": "- O (#PCDATA) -- selectable choice. (Normal elements.) [None] --",
  6. "attlist": {
  7. "%Global;": "",
  8. "disabled": "(disabled) #IMPLIED -- Whether the form control is disabled --",
  9. "label": "%Text; #IMPLIED -- User-visible label --",
  10. "selected": "(selected) #IMPLIED -- Whether the option is selected by default --",
  11. "value": "CDATA #IMPLIED -- Value to be used for form submission --",
  12. },
  13. "comment": "選択可能な選択肢 (selectable choice)",
  14. "point": "select要素内のオプション、または datalist要素内の提案リストの一部としてのオプションを表します。",
  15. "kind": "Normal",
  16. "categories": "None",
  17. "used": [
  18. "select",
  19. "datalist",
  20. "optgroup",
  21. ],
  22. "contentmodel": "option (%Text)",
  23. "contentmodelsupplement": [
  24. "要素に label属性と value属性がある場合は、Nothing",
  25. "要素に label属性はあるが value属性がない場合は、テキスト",
  26. "要素に label属性がなく、datalist要素の子ではない場合は、要素間の空白ではないテキスト",
  27. "要素に label属性がなく、datalist要素の子の場合は、テキスト",
  28. ],
  29. "tag": [
  30. "-",
  31. "O",
  32. ],
  33. "tagsupplement": "option要素の直後に別のoption要素が続く場合、その直後に optgroup要素が続く場合、直後に hr要素が続く場合、または親要素にそれ以上のコンテンツがない場合、option要素の終了タグは省略できます。",
  34. "attributes": {
  35. "disabled": "フォームコントロールが無効かどうか",
  36. "label": "ユーザーに見えるラベル",
  37. "selected": "オプションがデフォルトで選択されているかどうか",
  38. "value": "フォーム送信に使用される値",
  39. },
  40. "dominterface": "HTMLOptionElement",
  41. "rendering": "None",
  42. "reference": [
  43. {
  44. "title": "HTML Living Standard. 4.10.10 The option element.",
  45. "href": "https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element",
  46. "heading": "HTML Living Standard. 4.10.10 The option element",
  47. "sub": "Last Updated 27 August 2024",
  48. },
  49. {
  50. "title": "HTML Living Standard. 4.11 Interactive elements 4.11.3.5 Using the option element to define a command.",
  51. "href": "https://html.spec.whatwg.org/multipage/interactive-elements.html#using-the-option-element-to-define-a-command",
  52. "heading": "HTML Living Standard. 4.11 Interactive elements 4.11.3.5 Using the option element to define a command",
  53. "sub": "Last Updated 27 August 2024",
  54. },
  55. {
  56. "title": "HTML 5.2 W3C Recommendation. 4.10.10 The option element. W3C Recommendation, 14 December 2017.",
  57. "href": "https://www.w3.org/TR/2017/REC-html52-20171214/sec-forms.html#the-option-element",
  58. "heading": "HTML 5.2 W3C 勧告. 4.10.10 The option element",
  59. "sub": "W3C勧告、2017年12月14日",
  60. },
  61. {
  62. "title": "HTML 5.1 W3C Recommendation. 4.10.10 The option element. W3C Recommendation, 1 November 2016.",
  63. "href": "https://www.w3.org/TR/2016/REC-html51-20161101/sec-forms.html#the-option-element",
  64. "heading": "HTML 5.1 W3C 勧告. 4.10.10 The option element",
  65. "sub": "W3C勧告、2016年11月1日",
  66. },
  67. {
  68. "title": "HTML 5 W3C Recommendation. 4.10.10 The option element. W3C Recommendation, 28 October 2014.",
  69. "href": "https://www.w3.org/TR/2014/REC-html5-20141028/forms.html#the-option-element",
  70. "heading": "HTML 5 W3C 勧告. 4.10.10 The option element",
  71. "sub": "W3C勧告、2014年10月28日",
  72. },
  73. {
  74. "title": "HTML 4.01 Specification W3C Recommendation. 17.6 The SELECT, OPTGROUP, and OPTION elements. W3C Recommendation 24 December 1999.",
  75. "href": "https://www.w3.org/TR/html401/interact/forms.html#h-17.6",
  76. "heading": "HTML 4.01 Specification W3C 勧告. 17.6 The SELECT, OPTGROUP, and OPTION elements",
  77. "sub": "W3C勧告1999年12月24日",
  78. },
  79. {
  80. "title": "HTML 3.2 Reference Specification. W3C Recommendation 14-Jan-1997.",
  81. "href": "https://www.w3.org/TR/2018/SPSD-html32-20180315/#select",
  82. "heading": "HTML 3.2 Reference Specification",
  83. "sub": "W3C勧告1997年1月14日",
  84. },
  85. {
  86. "title": "Hypertext Markup Language - 2.0. November 1995.",
  87. "href": "https://www.ietf.org/rfc/rfc1866.txt",
  88. "heading": "Hypertext Markup Language - 2.0",
  89. "sub": "November 1995",
  90. },
  91. {
  92. "title": "MDN Web Docs. HTML <option>: The HTML Option element.",
  93. "href": "https://developer.mozilla.org/ja/docs/Web/HTML/Element/option",
  94. "heading": "<option>: HTML 選択肢要素 - HTML: ハイパーテキストマークアップ言語 | MDN",
  95. },
  96. ],
  97. "version": {
  98. "first": "HTML2",
  99. "latest": "HTML Living Standard",
  100. },
  101. }
  102. }

注意: 簡易に描画する為に、各項目の後ろに , を付与しています。JSON の形式では、末尾の項目の後には , は付けません。

最終確認日

2024-09-01


2.使用可能な箇所

select要素,
datalist要素,
optgroup要素に
配置できます。

option要素を使用できる状態(コンテキストContext)は、select要素, datalist要素, optgroup要素に配置できます。


3.配置できるコンテンツ

テキストを
配置できます。

optionは、(内容コンテンツContent)として、テキストを配置できます。ただし条件があります。
要素にlabelvalueがある場合は、「何もない」(Nothing) です。要素のコンテンツモデルが「何もない」の場合、要素にはテキストノード (要素間の空白以外) と要素ノードが含まれていてはなりません。
要素にlabelはあるがvalueがない場合は、テキストです。
要素にlabelがなく、datalistの子ではない場合は、要素間の空白ではないテキストです。
要素にlabelがなく、datalistの子の場合は、テキストです。


4.属性

グローバル属性と、
disabled,
label,
selected,
value を
設定できます。

optionは、グローバル属性disabled属性, label属性, selected属性, value属性を設定できます。

  1. <form action="./fmreceive.htm">
  2. <select name="nseSelect">
  3. <option value="">選択なし</option>
  4. <option>ABC123</option>
  5. <option>DEF456</option>
  6. </select>
  7. <button name="nbtSender" value="./fooption.htm#MAP4NEXT">ボタン</button>
  8. </form>

form要素を改めて提示していない限り、この雛型の 4 行目の一部分であるoption要素の開始タグを置き換えてデモとしています。

button要素valueの値は、作成者の決め事によりその都度送信元が分かる様に書き換えています。nameの値は、作成者の決め事によりnbtSenderで固定です。

disabled属性

  1. <option disabled>

disabled は、コントロールを非対話型にして、その値が送信されないようにする為に使用されるブール属性です。

label属性

  1. <option label="Lavel01">

label は、要素のラベルを提供します。option要素のラベルは、label コンテンツ属性の値 (存在する場合) であり、その値が空の文字列でない場合は、要素の text IDL 属性の値です。

label コンテンツ属性が指定されている場合、空であってはなりません。

  1. <form action="./fmreceive.htm">
  2. <select name="nseSelect">
  3. <option value="">選択なし</option>
  4. <option label="L01" value="V01"></option>
  5. <option label="L02">C02</option>
  6. <option label="L03"></option>
  7. </select>
  8. <button name="nbtSender" value="./fooption.htm#MH3LABEL">ボタン</button>
  9. </form>

この例は、labelが指定されていて他の属性, コンテンツの組み合わせにより、どの値が送信データとなるかの例示です。

labelvalueが共にある場合, labelはあるがvalueがない場合でコンテンツが要素間の空白ではないテキストの場合, 要素間の空白の場合 の3通りを各option要素で用意してみました。実際に送信してみないと違いが判りませんが、一応の例示です。

selected属性

  1. <option selected>

selected は、ブール属性です。これは、要素のデフォルトの選択状態を表します。

multipleが指定されていないselect要素には、selectedが設定された子孫option要素が複数存在してはなりません。

value属性

  1. <option value="Value01">

value は、要素の値を提供します。option要素の値は、value コンテンツ属性がある場合はその値、ない場合は要素の text IDL 属性の値になります。

  1. <form action="./fmreceive.htm">
  2. <select name="nseSelect">
  3. <option value="">選択なし</option>
  4. <option label="L01" value="V01"></option>
  5. <option value="V02">C02</option>
  6. </select>
  7. <button name="nbtSender" value="./fooption.htm#MH3VALUE">ボタン</button>
  8. </form>

この例は、valueが指定されていて他の属性, コンテンツの組み合わせにより、どの値が送信データとなるかの例示です。

labelvalueが共にある場合, labelはないがvalueがある場合でコンテンツが要素間の空白ではないテキストの場合 の2通りを各option要素で用意してみました。実際に送信してみないと違いが判りませんが、一応の例示です。


5.Web API

select要素,
datalist要素の
プロパティである
optionsは、
それらの要素内の
option要素
(HTMLCollection
オブジェクト)の
HTMLCollectionを
返します。

option要素単体を表すプロパティはないですが、option要素をフィルターとするselect要素, datalist要素をルートとする HTMLCollection を返すoptionsがあります。

  1. <form action="./fmreceive.htm">
  2. <select name="nseSelect" id="iseSelect551">
  3. <option value="">選択なし</option>
  4. <option label="L01" value="V01"></option>
  5. <option label="L02">C02</option>
  6. <option label="L03"></option>
  7. <option value="V04">C04</option>
  8. <option>C05</option>
  9. </select>
  10. <button name="nbtSender" value="./fooption.htm#MAP5NEXT">ボタン</button>
  11. </form>
  12. <div>このselectのoptionは、
  13. <div id="idvJsOption551">〇〇</div>
  14. </div>
  15. <script>
  16. document.addEventListener("DOMContentLoaded", function() {
  17. var voDiv551 = document.getElementById("idvJsOption551");
  18. var veOl = document.createElement("ol");
  19. var veLi = document.createElement("li");
  20. var veSpan = document.createElement("span");
  21. var voOptions = document.getElementById("iseSelect551").options;
  22. for (var i = 0; i < voForms150.length; i++){
  23. veLi = document.createElement("li");
  24. veSpan = document.createElement("span");
  25. veSpan.innerHTML = 'disabled="' + voOptions[i].disabled + '"<br>selected="' + voOptions[i].selected + '"<br>label="' + voOptions[i].label + '"<br>value="' + voOptions[i].value + '"<br>text="' + voOptions[i].text + '"';
  26. veLi.appendChild(veSpan);
  27. veOl.appendChild(veLi);
  28. }
  29. if(veOl.childElementCount) {
  30. voDiv551.textContent = "";
  31. while(voDiv551.firstChild){
  32. voDiv551.removeChild(voDiv551.firstChild);
  33. }
  34. voDiv551.appendChild(veOl);
  35. }
  36. });
  37. </script>

option要素を扱う例示です。ここではselect要素の子孫での例ですが、datalist要素の子孫でも変わらない部分を提示しています。

select要素の取得をidを用いて documentgetElementById()メソッドで行っていますが、単なる例示なので出来れば良いでこの方法を採用しています。 実際に使う時には、form要素からnameで辿るなど、どこのフォームか分かる方が良いかもしれません。命名規則で対応するのもありかもしれないので、その辺は内部規約で決めておくのが良いでしょう。

このselectのoptionは、
  1. disabled="false"
    selected="true"
    label="選択なし"
    value=""
    text="選択なし"
  2. disabled="false"
    selected="false"
    label="L01"
    value="V01"
    text=""
  3. disabled="false"
    selected="false"
    label="L02"
    value="C02"
    text="C02"
  4. disabled="false"
    selected="false"
    label="L03"
    value=""
    text=""
  5. disabled="false"
    selected="false"
    label="C04"
    value="V04"
    text="C04"
  6. disabled="false"
    selected="false"
    label="C05"
    value="C05"
    text="C05"

6.レンダリング

レンダリングについて
スタイルシートでの
仕様での提案は
特にないようです。

option要素は、select要素がレンダリングするリストボックスまたはドロップダウンボックスのリストの中の1つである事が期待されているという記述があるだけで、option要素自体のレンダリングに関してのスタイルシートでの提案はないようです。

option要素は、要素のラベルを表示することによってレンダリングされることが期待されます。ラベルは、optgroup要素がある場合はその下にインデントされます。

他の要素を代用して同等のレンダリングをする事を考えたら、リストの1項目という事でdisplay: list-itemが意味的には使えるかもしれません。マーカーを意識する必要があるので、手間は増えますが。
技術的にレンダリングだけを考えたら、ブロックレベルボックスを生成すればよいのでdisplay: blockが使い勝手が良いでしょう。代用する要素をdiv要素とするだけで良いので容易です。


7.気を付ける点

インターフェース

option要素は、select要素またはdatalist要素での選択可能な選択肢としての要素な訳で、フォームコントロールの一部を成す為のデータを提示するものかと思います。なので、「ユーザー」, 「作成者」だけでなく「送信先」も意識した作りが必要です。

「ユーザー」を意識したページの分かり易さや使い易さ、「作成者」を意識したソースコードの書き易さや読み易さ、「送信先」を意識した送信データの使い易さなど、バランスが大変ですがとりあえず意味ある作りを心掛けましょう。