Planet For Application Life Development Presents
MY IT World

Explore and uptodate your technology skills...

HTML - Checkboxes

HTML - Checkbox Forms

Setting the type attribute of an <input> tag to checkbox places a checkbox element onto the web page.

Deploy checkbox elements in a situation when the user must check all boxes that apply (or none). A scripting language such as PHP will easily handle this form element, returning all elements the user has checked.

HTML Checkbox Code

<form name="myWebForm" action="mailto:youremail@email.com" method="post">
<p>Please select every sport that you play.</p>
Soccer: <input type="checkbox" name="sports" value="soccer" /><br />
Football: <input type="checkbox" name="sports" value="football" /><br />
Baseball: <input type="checkbox" name="sports" value="baseball" /><br />
Basketball: <input type="checkbox" name="sports" value="basketball" />
</form>

HTML Checkbox Form

Please select every sport that you play.
Soccer:
Football:
Baseball:
Basketball: