The best magazine
HTML Checkbox Tutorial
- 1). Bring up your computer's text editor program and create a new Web page document.
- 2). Type "<form></form>" tags in the area where you want your checkbox to appear. To illustrate:
<form>
</form> - 3). Place your cursor between the form tags and enter "<input type=" " name=" " value=" " />." Further, type a title before the code to let the viewer know what the checkbox is for. For instance:
Pepperoni <input type=" " name=" " value=" " / > - 4). Position your cursor between the first set of quotation marks after "type" and enter "checkbox" to specify that you are creating a checkbox. Further, enter a term of your choosing after the "name" to identify this information when it gets sent back to you. Lastly, type another desired term after "value" to pinpoint the particular answer that the user selected. For example:
Pepperoni <input type="checkbox" name="pizza" value="pepperoni" /> - 5). Repeat Steps 3 and 4 to create another checkbox, but this time enter a new title, name and value to properly label this box. For instance:
Mushrooms <input type="checkbox" name="pizza" value="mushrooms" /> - 6). Save your document. Your complete code now looks as follows:
<form>
Pepperoni <input type="checkbox" name="pizza" value="pepperoni" />
Mushrooms <input type="checkbox" name="pizza" value="mushrooms" />
</form>
Source: ...