<fieldset>

You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!

The HTML <fieldset> 요소는 웹 폼 내에서 <label> 과 같은 여러 컨트롤을 그룹화 하는데 사용됩니다.

속성

This element includes the global attributes.

disabled HTML5
If this Boolean attribute is set, the form controls that are its descendants, except descendants of its first optional <legend> element, are disabled, i.e., not editable. They won't receive any browsing events, like mouse clicks or focus-related ones. Often browsers display such controls as gray.
form HTML5
This attribute has the value of the id attribute of the <form> element its related to. Its default value is the id of the nearest <form> element it is a descendant of.
name HTML5
The name associated with the group, which is submitted with the form data.
The label for the field set is given by the first <legend> element that is a child of this field set.

예제

Simple fieldset

This example shows a really simple <fieldset> example, with a <legend>, and a single control inside it.

<form action="#">
  <fieldset>
    <legend>Simple fieldset</legend>
    <input type="radio" id="radio">
    <label for="radio">Spirit of radio</label>
  </fieldset>
</form>

Disabled fieldset

This example shows a disabled <fieldset> with two controls inside it. Note how both the controls are disabled due to being inside a disabled <fieldset>.

<form action="#">
  <fieldset disabled>
    <legend>Disabled fieldset</legend>
    <div>
      <label for="name">Name: </label>
      <input type="name" id="text" value="Chris">
    </div>
    <div>
      <label for="pwd">Archetype: </label>
      <input type="password" id="text" value="Wookie">
    </div>
  </fieldset>
</form>

명세

명세 상태 주석
HTML Living Standard
The definition of '<fieldset>' in that specification.
Living Standard Definition of the fieldset element
HTML Living Standard Living Standard Suggested default rendering of the fieldset and legend elements
HTML5
The definition of '<fieldset>' in that specification.
Recommendation  
HTML 4.01 Specification
The definition of '<fieldset>' in that specification.
Recommendation  

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
fieldsetChrome Full support Yes
Notes
Full support Yes
Notes
Notes Does not support flexbox and grid layouts within this element. See bug 262679.
Edge Full support Yes
Notes
Full support Yes
Notes
Notes Does not support flexbox and grid layouts within this element. See bug 4511145.
Firefox Full support YesIE Full support YesOpera Full support Yes
Notes
Full support Yes
Notes
Notes Does not support flexbox and grid layouts within this element. See bug 262679.
Safari Full support YesWebView Android Full support Yes
Notes
Full support Yes
Notes
Notes Does not support flexbox and grid layouts within this element. See bug 262679.
Chrome Android Full support Yes
Notes
Full support Yes
Notes
Notes Does not support flexbox and grid layouts within this element. See bug 262679.
Firefox Android Full support YesOpera Android Full support Yes
Notes
Full support Yes
Notes
Notes Does not support flexbox and grid layouts within this element. See bug 262679.
Safari iOS Full support YesSamsung Internet Android Full support Yes
Notes
Full support Yes
Notes
Notes Does not support flexbox and grid layouts within this element. See bug 262679.
disabledChrome Full support YesEdge Partial support Partial
Notes
Partial support Partial
Notes
Notes Does not work with nested fieldsets. For example: <fieldset disabled><fieldset><!--Still enabled--></fieldset></fieldset>
Firefox Full support YesIE Full support Yes
Notes
Full support Yes
Notes
Notes Not all form control descendants of a disabled fieldset are properly disabled in IE11; see IE bug 817488: input[type='file'] not disabled inside disabled fieldset and IE bug 962368: Can still edit input[type='text'] within fieldset[disabled].
Opera Full support 12Safari Full support 6WebView Android Full support 4.4Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS Full support 6Samsung Internet Android Full support Yes
formChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
nameChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
Partial support  
Partial support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

같이 보기