HomeReferencesHTML Tags

HTML Tag: legend

Defines a caption for a fieldset. The element must appear directly after the opening fieldset tag.

HTML Dog, The Book HTML Dog book cover

HTML Dog is hosted by Titan Internet

Required Attributes

  • None.

Optional Attributes

  • accesskey can be used to associate a keyboard shortcut to the element.
  • Common attributes

Example


<fieldset>
	<legend>Name</legend>
	<div>First name: <input name="firstname" /></div>
	<div>Surname: <input name="surname" /></div>
</fieldset>