Showing posts with label Checkboxes. Show all posts
Showing posts with label Checkboxes. Show all posts

Tuesday, October 22, 2013

How to use checkboxes in html

Hey everyone how are you guys,
so far we have learned about forms and how to create a form will textboxes and a button.
Today we will learn to add checkboxes in a form.
The reason for using a checkbox option in a form is if we want to select multiple items for example if we want to give a few options to the person and want him to select one or more than one items from the giving options in the checkboxes and the person selects from it.

<html>
<head>
<body>

<form>
<input type="checkbox" name="option1" value="Car"> Car<br>
<input type="checkbox" name="option2" value="Bike"> Bike<br>
<input type="checkbox" name="option3" value="Truck"> Truck<br>
</form>

</body>
</html>


So above is the code for adding checkboxes in a form,the procedure is the same as the procedure for adding the textbox fields.Anywhere in your website where you want to add checkboxes your will have to follow this procedure which is very simple and i assure your all that your will automatically memorize this after you use it once or twice.
I hope this helps,thank you for reading everyone..next we will learn to add radio buttons to our form.