XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / fieldset

(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

   

fieldset

HTML 4.01 | HTML 5

<fieldset> ... </fieldset>

Defines a set of related form controls and labels. fieldset elements must appear inside a form element. fieldset works similarly to div, but is specifically intended to group form fields and input elements. It was introduced to improve accessibility for users of alternative browsers, such as speech synthesizers and Braille displays.

Start/end tag

Required/required

Attributes

Core, internationalization, events, global HTML 5 attributes

  • disabled (disabled="disabled" in XHTML 5)

    HTML 5 only. Disables the enclosed input elements. Only a script can change this. Browsers may display controls marked disabled differently, for example grayed out. This can be useful to dim certain controls until the required information has been entered.

  • form="ID des übergeordneten Formulars"

    HTML 5 only. Explicitly associates the control with its parent form. With this method, the control need not be a descendant of the form element to which it applies.

  • name="Text"

    HTML 5 only. Gives the fieldset a name.

Example

<form>
<fieldset id="Kunde">
  <legend>Kontaktinformationen:</legend>
  <label>Name und Nachname: <input type="text" name="name"></label>
  <label>E-Mail-Adresse: <input type="text" name="email"></label>
  <label>Land: <input type="text" name="land"></label>
</fieldset>
</form>

 

> back to the alphabetical list of elements

   

 

 

 

back to top