HTML 5: The Markup Language (ARIA Edition)

fieldsetset of related form controls # T

The fieldset element represents a set of form controls grouped under a common name.

Permitted contents #

an optional legend element, followed by flow content

Permitted attributes #

global attributes
Any attributes permitted globally.
group = #
(detailed attribute description to come)
name = string #
The name part of the name/value pair associated with this element for the purposes of form submission.
disabled = d:string "disabled" or d:string "" #
Specifies that the element represents a disabled control.
form = ID reference NEW #
The value of the id attribute on the form with which to associate the element.

Tag omission #

A fieldset element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain flow elements

DOM interface #

interface HTMLFieldSetElement : HTMLElement {
           attribute boolean disabled;
  readonly attribute HTMLFormElement? form;
           attribute DOMString name;

  readonly attribute DOMString type;

  readonly attribute HTMLFormControlsCollection elements;

  readonly attribute boolean willValidate;
  readonly attribute ValidityState validity;
  readonly attribute DOMString validationMessage;
  boolean checkValidity();
  void setCustomValidity(DOMString error);

Typical default display properties #

fieldset {
display: block;
margin-start: 2px;
margin-end: 2px;
padding-before: 0.35em;
padding-start: 0.75em;
padding-end: 0.75em;
padding-after: 0.625em;
border: 2px groove (internal value); }