Grouping Related Fields

Two other XHTML form elements that recognize the use of nonvisual browsers are the <fieldset> and <legend> elements. <fieldset> enables you to group related form fields together in a logical group, and <legend> enables you to assign descriptive text to the group of fields. Neither of these might seem necessary on a standard visual browser, but for a visually impaired user with a speech-based browser, these extra features make a form much more usable.

Note

One advantage of using <fieldset> grouping on a visual browser is that it facilitates tabbing through the form field. After the browser knows about a group of fields, it can tab you through the fields in sequence.

<fieldset> is a container element that does not have ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.