Name

legend — <legend> . . . </legend>

Assigns a caption to a fieldset (it must be contained within a fieldset element). This improves accessibility when the fieldset is rendered nonvisually.

Attributes

Core, Internationalization, Events

accesskey="character"

Assigns an access key (keyboard shortcut) to an element for quicker access.

align="top|bottom|left|right"

Deprecated . Aligns the text relative to the fieldset.

Example

<fieldset>
  <legend> Mailing List Sign-up</legend>
  <label>Add me to your mailing list <input type="radio" name"list" /></label>
  <label>No thanks <input name"list" value="no" /></label>
</fieldset>

Get HTML and XHTML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.