HTML: The Markup Language

fieldsetset of related form controls # T

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

Permitted content #

an optional legend element, followed by flow content

Permitted attributes #

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(in DOMString error);

Typical default display properties #

fieldset {
display: block;
margin-left: 2px;
margin-right: 2px;
padding: 0.35em 0.75em 0.625em;
border: 2px groove (internal value); }