Fieldsets and Legends - Form Organization
The <fieldset> tag creates a border around a form, or section of a form to organize elements. Fieldset creates a box around the included form elements.
The <legend> tag adds text to the fieldset box.
Even short, simple forms benefit from use of the fieldset and legend tags as they are more quickly and easily understood with their use.
HTML source
<form action="http://www.utexas.edu/teamweb/cgi-bin/generic.cgi" method="post"><fieldset>
<legend>Required Information</legend>
<label for="firstname">
First name: <input type="text" name="firstname" id="firstname" />
</label><br />
<label for="lastname">
Last name: <input type="text" name="lastname" id="lastname" /></label><br />
<label for="email">
email: <input type="text" name="email" id="email" /></label><br />
</fieldset>
</form>
