24-HTML Checkbox

0
266

This tutorial is all about HTML Checkbox.
Checkbox are used by users who like to select multiple option just like an example of a “check all” question.

 

 

Example:

<p>Please select the sport/s that you have played.</p>

Table Tennis: <input type=”checkbox” name=”sport” value=”table tennis” /><br />

Tennis: <input type=”checkbox” name=”sport” value=”tennis” /><br />

Volleyball: <input type=”checkbox” name=”sport” value=”volleyball” /><br />

Baseball: <input type=”checkbox” name=”sport” value=”baseball” />

 

 

 

Example on how to set a checkbox with  a default checked every time the HTML page is loaded:

<p>Please select the sport/s that you have played.</p>

Table Tennis: <input type=”checkbox” name=”sport” value=”table tennis”  checked=”yes”/><br />

Tennis: <input type=”checkbox” name=”sport” value=”tennis”   /><br />

Volleyball: <input type=”checkbox” name=”sport” value=”volleyball”   /><br />

Baseball: <input type=”checkbox” name=”sport” value=”baseball”    checked=”yes”/>

 

 

Readers might read also:

 

 

 

 

 

Facebook Comments
(Visited 20 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here