Horje
How to create HTML Input Type Checkbox

<input type="checkbox"> defines a checkbox.

Checkboxes let a user select ZERO or MORE options of a limited number of choices.


How is to look HTML Input Type Checkbox

index.html
Example: HTML
<input type="checkbox" id="vehicle2" name="vehicle2" value="Car">

Output should be:

How is to look HTML Input Type Checkbox

Full Code Example of HTML Input Type Checkbox

The input type="checkbox" defines a checkbox:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Checkboxes</h2>
<p>The <strong>input type="checkbox"</strong> defines a checkbox:</p>

<form action="/action_page.php">
  <input type="checkbox" id="vehicle1" name="vehicle1" value="Bike">
  <label for="vehicle1"> I have a bike</label><br>
  <input type="checkbox" id="vehicle2" name="vehicle2" value="Car">
  <label for="vehicle2"> I have a car</label><br>
  <input type="checkbox" id="vehicle3" name="vehicle3" value="Boat">
  <label for="vehicle3"> I have a boat</label><br><br>
  <input type="submit" value="Submit">
</form> 

</body>
</html>

Output should be:

Full Code Example of HTML Input Type Checkbox





Category:
Web Tutorial
Sub Category:
HTML Input Types
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference