HTML Form Usability

There are a number of newer HTML elements that are primarily useful for usability and styling.

The <fieldset> element groups related elements in forms.

The <legend> element creates captions for groups of form elements (grouped with the <fieldset> element).

The <label> element labels form elements, or provides captions, which is especially useful when using CSS to style forms.

Example:

<form action="what-to-do-next.php" method="post">
<fieldset>
<legend>Activities>/legend>
<label>Favorite Sport</label>
<input type="text" name="favsport">
<label>Favorite Craft</label>
<input type="text" name="favcraft">
<input type="submit" value="Submit">
</fieldset>
</form>

Result:

Activities