Back to home

Radio buttons and keyboard use

Operation

Example

Do you like apples?

Code sample

<form class="example" action="#">
	<fieldset>
		<legend>Do you like apples?</legend>
		<div>
			<input type="radio" id="apples-y" name="apples">
			<label for="apples-y">Yes</label>
		</div>
		<div>
			<input type="radio" id="apples-n" name="apples">
			<label for="apples-n">No</label>
		</div>
		<div>
			<input type="radio" id="apples-m" name="apples">
			<label for="apples-m">Maybe</label>
		</div>
		<div>
			<input type="radio" id="apples-s" name="apples">
			<label for="apples-s">Sometimes</label>
		</div>
	</fieldset>
</form>

Bottom of page - Back to home