HTML Page Structure

HTML Elements
HTML Attributes


HTML Checkbox Tag

You know that you can use radio button when you want the user to select only one option from a set of options/alternatives. In the same way, if you want that the user can chose one or more options, you can use "checkbox" using the <input> tag making it's type equals to "checkbox".

It has three required attributes type, name and value. There are two optional attributes also and those are id and checked.

Syntax

Example

This will produce following result

What is/are your favourite color/s?

Red

Yellow

Green

Blue