Warning:
This wiki has been archived and is now read-only.

Elements/legend

From HTML Wiki
Jump to: navigation, search

<legend>

The <legend> element represents a caption for the rest of the contents of the legend element's parent fieldset element.

Point


HTML Attributes

See global attributes.


Examples

Example A

[try it]:

<fieldset name="userinfo">
  <legend>User information</legend>
  <label for="name">Name</label>
  <input type="text" name="name" id="name" size="40">
  <label for="address">Address</label>
  <input type="text" name="address" id="address" size="40">
  <label for="phone">Phone</label>
  <input type="text" name="phone" id="phone" size="40">
</fieldset>


HTML Reference

The HTML5 specification defines the <legend> element in 4.10.5 The legend element.