Home Html Check Box in HTML



Check Box in HTML
Posted on: December 3, 2008 at 12:00 AM
Checkbox is used in html when a users want to select more than one or more option from a set of alternatives.

Check Box in HTML

     

Checkbox is used in html when a users want to select more than one or more option from a set of alternatives. If a user wants to select only one option, user can choose a radio button in html page.

Understand with Example

The Tutorial explains you an example from Checkbox in HTML. In this tutorial code, we create a set of check box, this set of check box can be selected more than one by the user.

<input type> :  The HTML page contains <input type>tag  define the start of input field in which the data can be entered by the user.

<name> : In this html code, it define a common name for the input element.

<value> :This define the output value of input element in  html page, when it is clicked. The Result is sent to the specified form's action URL.

<form action="">

I have a bicycle:
<input type="checkbox" name="vehicle" value="bicycle">

I have a bike:
<input type="checkbox" name="vehicle" value="bike">

I have a car:
<input type="checkbox" name="vehicle" value="car">

I have a bus:
<input type="checkbox" name="vehicle" value="bus">

I have a truck:
<input type="checkbox" name="vehicle" value="truck">

I have a aeroplane:
<input type="checkbox" name="vehicle" value="aeroplane">


</form>

Defines the result of the input element when clicked. The result is sent to the form's action URL.Save the code with .html extension. Paste the path of html code into a URL of  the browser. The output on the browser is displayed as  -

 
I have a bicycle:

I have a bike:

 I have a car:

 I have a bus:

 I have a truck:

 I have an aeroplane:

 

User can choice more than one option at a time.

 

Download

Related Tags for Check Box in HTML:
htmlcantselectbuttoncheckboxiouserseduserspagenativesetooradalternativecheckifboxnatradiotooptionealtercanusefrominmlalternativesmntwanoscaosadesaltagewhensatkhtmishaivwantttssthatiantskbonlyonomonl


More Tutorials from this section

Ask Questions?    Discuss: Check Box in HTML   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.