Back to home

Checkboxes and keyboard use

Operation

Example

Favourite colors?

Code sample

<form class="example" action="#">
	<fieldset>
		<legend>Favourite colors?</legend>
		<div>
			<input type="checkbox" id="red" name="red">
			<label for="red">red</label>
		</div>
		<div>
			<input type="checkbox" id="green" name="green">
			<label for="green">green</label>
		</div>
		<div>
			<input type="checkbox" id="blue" name="blue">
			<label for="blue">blue</label>
		</div>
		<div>
			<input type="checkbox" id="yellow" name="yello">
			<label for="yellow">yellow</label>
		</div>
	</fieldset>
</form>

Bottom of page - Back to home