HTML <legend> tag

Usage

Defines a caption for a fieldset.

Example

Code:

<fieldset>
<legend>Login details:</legend>
Username: <input type="text" size="20" />
<br />
Password: <input type="password" size="20" />
</fieldset>

Output:

Login details: Username:
Password:

Required Attributes

  • none

Optional Attributes

  • none

Core Attributes