Forms / The visual dictionary

Fieldset.

Semantically groups related form controls under one legend.

Also calledfield setlegend group
01

See it in context

UI illustration
Preferred contact

In HTML, a fieldset and legend express a shared question or purpose for several controls. It is particularly useful for radio and checkbox sets where individual labels need a group context.

When to use it

Use a concise legend and keep individual control labels understandable within it.

Know the difference

A decorative border alone does not create the semantic group that a fieldset provides.

WebiOSiPadOSAndroidmacOSWindowsLinux

Web

Use a native button for an action and an anchor for navigation. Preserve keyboard activation and a visible focus indicator.

iOS · iPadOS · Android

Provide a comfortable touch target, use familiar system symbols when appropriate, and show a clear pressed or selected state.

macOS · Windows · Linux

Keep pointer, keyboard, and focus behavior consistent. Common commands can additionally expose a menu item or keyboard shortcut.

Primary documentation for the pattern and its platform conventions.