DONT ADD ANYTHING HERE!

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

legend

The legend element represents a caption for the contents of its parent fieldset

Notes

  1. The name of the group is given by the first legend element that is a child of the fieldset element, if any
  2. The remainder of the descendants form the group
  3. The disabled attribute, when specified, causes all the form control descendants of the fieldset element, excluding those that are descendants of the fieldset element's first legend element child, if any, to be disabled
  4. The form attribute is used to explicitly associate the fieldset element with its form owner
  5. The name attribute represents the element's name

Example

HTML

<form action="#">
    <fieldset>
        <legend>Do you agree?</legend>
        <input type="checkbox" id="chbx" name="agree" value="Yes!" />
        <label for="chbx">I agree</label>
    </fieldset>
</form>
                            

Browser

Do you agree?

Mnemonic

A legend in its own fieldset

References