This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The HTMLFieldSetElement interface provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <fieldset> elements.
Inherits properties from its parent, HTMLElement.
HTMLFieldSetElement.disabledA boolean value reflecting the disabled HTML attribute, indicating whether the user can interact with the control.
HTMLFieldSetElement.elements Read only
The elements belonging to this field set. The type of this property depends on the version of the spec that is implemented by the browser.
HTMLFieldSetElement.form Read only
An HTMLFormControlsCollection or HTMLCollection referencing the containing form element, if this element is in a form. If the field set is not a descendant of a form element, then the attribute can be the ID of any form element in the same document it is related to, or the null value if none matches.
HTMLFieldSetElement.nameA string reflecting the name HTML attribute, containing the name of the field set. This can be used when accessing the field set in JavaScript. It is not part of the data which is sent to the server.
HTMLFieldSetElement.type Read only
The string "fieldset".
HTMLFieldSetElement.validationMessage Read only
A string representing a localized message that describes the validation constraints that the element does not satisfy (if any). This is the empty string if the element is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints.
HTMLFieldSetElement.validity Read only
A ValidityState representing the validity states that this element is in.
HTMLFieldSetElement.willValidate Read only
A boolean value false, because <fieldset> objects are never candidates for constraint validation.
Inherits methods from its parent, HTMLElement.
HTMLFieldSetElement.checkValidity()Always returns true because <fieldset> objects are never candidates for constraint validation.
HTMLFieldSetElement.reportValidity()Always returns true because <fieldset> objects are never candidates for constraint validation.
HTMLFieldSetElement.setCustomValidity()Sets a custom validity message for the field set. If this message is not the empty string, then the field set is suffering from a custom validity error, and does not validate.
| Specification |
|---|
| HTML> # htmlfieldsetelement> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
HTMLFieldSetElement |
1 | 12 | 1 | ≤12.1 | 3 | 18 | 4 | ≤12.1 | 1 | 1.0 | 4.4 | 1 |
checkValidity |
4 | 12 | 4 | ≤12.1 | 5 | 18 | 4 | ≤12.1 | 5 | 1.0 | 4.4 | 5 |
disabled |
20 | 12 | 4 | ≤12.1 | 6 | 25 | 4 | ≤12.1 | 6 | 1.5 | 4.4 | 6 |
elements |
21 | 17 | 4 | ≤12.1 | 7 | 25 | 4 | ≤12.1 | 7 | 1.0 | 4.4 | 7 |
form |
1 | 12 | 1 | ≤12.1 | 3 | 18 | 4 | ≤12.1 | 1 | 1.0 | 4.4 | 1 |
name |
19 | 14 | 4 | 15 | 6 | 25 | 4 | 14 | 6 | 1.0 | 4.4 | 6 |
reportValidity |
40 | 17 | 49 | 27 | 10.1 | 40 | 64 | 27 | 10.3 | 4.0 | 40 | 10.3 |
setCustomValidity |
4This method only updates the validation error popup, not the tooltip that appears when hovering the mouse over the element, see bug 41380670. |
12 | 4 | ≤12.1 | 5 | 18This method only updates the validation error popup, not the tooltip that appears when hovering the mouse over the element, see bug 41380670. |
4 | ≤12.1 | 5 | 1.0This method only updates the validation error popup, not the tooltip that appears when hovering the mouse over the element, see bug 41380670. |
4.4This method only updates the validation error popup, not the tooltip that appears when hovering the mouse over the element, see bug 41380670. |
5 |
type |
19 | 17 | 4 | 15 | 6 | 25 | 4 | 14 | 6 | 1.0 | 4.4 | 6 |
validationMessage |
5 | 12 | 4 | ≤12.1 | 5 | 18 | 4 | ≤12.1 | 4 | 1.0 | 4.4 | 4 |
validity |
4 | 12 | 4 | ≤12.1 | 5 | 18 | 4 | ≤12.1 | 4 | 1.0 | 4.4 | 4 |
willValidate |
2 | 12 | 4 | ≤12.1 | 4 | 18 | 4 | ≤12.1 | 3 | 1.0 | 4.4 | 3 |
<fieldset>.
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLFieldSetElement