Home Html Check Box in HTML

Related Tutorials


 
 

Share on Google+Share on Google+

Check Box in HTML

Advertisement
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

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 3, 2008

Related Tutorials

Discuss: Check Box in HTML   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com