Skip to main content Accessibility Feedback
Skip to Documentation Content

Fieldset

Use the <fieldset> element to group a set of related radio buttons or checkboxes together. Include a <legend> element inside it to label the set of inputs.

What's your favorite Pixar movie?
<fieldset>
	<legend>What's your favorite Pixar movie?</legend>
	<label for="up">
		<input type="radio" id="up" name="movie" value="up">
		Up!
	</label>
	<label for="wall-e">
		<input type="radio" id="wall-e" name="movie" value="wall-e">
		WALL-E
	</label>
	<label for="toy-story">
		<input type="radio" id="toy-story" name="movie" value="toy-story">
		Toy Story
	</label>
</fieldset>