<option>

HTML <option> 요소<select>, <optgroup>, <datalist> 요소의 항목을 정의합니다. 그러므로, <option>을 사용해 팝업 메뉴 등 목록에서 하나의 항목을 나타낼 수 있습니다.

콘텐츠 카테고리 없음.
가능한 콘텐츠 텍스트. 이스케이프 처리한 문자(&eacute; 등)도 가능.
태그 생략 여는 태그는 필수입니다. 바로 뒤따르는 요소가 <optgroup>, 다른 <option>이거나, 자신이 부모의 마지막 자식이라면 닫는 태그를 생략할 수 있습니다.
가능한 부모 요소 <select>, <optgroup>, <datalist> 요소.
가능한 ARIA 역할 없음
DOM 인터페이스 HTMLOptionElement

특성

이 요소는 전역 특성을 포함합니다.

disabled
지정한 경우 이 옵션을 선택할 수 없습니다. 브라우저에서, 비활성화 옵션은 주로 회색으로 보이며, 클릭과 포커스 등 모든 이벤트를 받지 않습니다. <option>disabled 특성을 추가하지 않더라도, <optgroup> 등 조상 요소로 인해 비활성화될 수 있습니다.
label
옵션의 뜻을 나타내는 텍스트. 지정하지 않은 경우, 요소의 텍스트 콘텐츠를 대신 사용합니다.
selected
지정한 경우 초기에 이 옵션을 선택한 상태로 설정합니다. multiple를 지정하지 않은 <select> 요소의 자손인 경우, 하나의 <option>selected 특성을 가질 수 있습니다.
value
양식 데이터를 구성할 때 사용할 값. 지정하지 않은 경우, 요소의 텍스트 콘텐츠를 대신 사용합니다.

예제

<select> 요소를 참고하세요.

명세

Specification Status Comment
HTML Living Standard
The definition of '<option>' in that specification.
Living Standard
HTML5
The definition of '<option>' in that specification.
Recommendation
HTML 4.01 Specification
The definition of '<option>' in that specification.
Recommendation Initial definition

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
optionChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
disabledChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
labelChrome Full support 1Edge Full support 12Firefox Full support 1
Notes
Full support 1
Notes
Notes Before 77, Firefox didn't display the value of the label attribute as option text if element's content was empty. See bug 40545.
Notes Historically, Firefox has allowed keyboard and mouse events to bubble up from the <option> element to the parent <select> element, although this behavior is inconsistent across many browsers. For better Web compatibility (and for technical reasons), they will not bubble up when Firefox is in multi-process mode and the <select> element is displayed as a drop-down list. The behavior is unchanged if the <select> is presented inline and it has either the multiple attribute defined or a size attribute set to more than 1. Rather than watching <option> elements for events, you should watch for change events on <select>. See bug 1090602 for details.
Notes When Mozilla introduced dedicated content threads to Firefox (through the Electrolysis, or e10s, project), support for styling <option> elements was removed temporarily. Starting in Firefox 54, you can apply foreground and background colors to <option> elements again, using the color and background-color CSS properties. See bug 910022 for more information. Note that this is still disabled in Linux due to lack of contrast (see bug 1338283 for progress on this).
IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4
Notes
Full support 4
Notes
Notes Before 77, Firefox didn't display the value of the label attribute as option text if element's content was empty. See bug 40545.
Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
selectedChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
valueChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
See implementation notes.
See implementation notes.