|
|
HTML Forms - Checkboxes
Checkboxes
Checkboxes are designed for when a user may want to select none, one or many of the options presented to them, a kind-of "tick all that apply" style input. They are created using the
type="checkbox" attribute in the input tag:<p>What would you like to learn?</p> HTML: <input type="checkbox" name="html" /> CSS: <input type="checkbox" name="css" /> PHP: <input type="checkbox" name="php" /> MySQL: <input type="checkbox" name="mysql" /> What would you like to learn? HTML: CSS: PHP: MySQL:
Pre-selected checkboxes
You can automatically select a textbox using the
checked="yes" attribute.<p>What would you like to learn?</p> HTML: <input type="checkbox" name="html" checked="yes" /> CSS: <input type="checkbox" name="css" /> PHP: <input type="checkbox" name="php" checked="yes" /> MySQL: <input type="checkbox" name="mysql" /> What would you like to learn? HTML: CSS: PHP: MySQL:Page Responses
Currently there have been no responses to this page...
If you have anything to contribute to this tutorial, found a bug, or know a better way of achieving the same goal, please leave your response below.
|