How to Input a Checkbox in HTML

How to Input a Checkbox in HTML thumbnail
Checkboxes are used in HTML forms.

Checkboxes are considered to be on/off switches within HTML forms. By clicking on a checkbox, a user can toggle between turning a switch on and off. If a checkbox is checked then it is considered "on"and is passed to the server with the submission of a form. If a checkbox is left blank, it is considered "off" and will not be included with a form submission.

Instructions

    • 1

      Open your favorite HTML editor. If using a WYSIWYG (What You See Is What You Get) editor, switch to view the source code.

    • 2

      Enter the following line of code as part of a form within the body of an HTML document.

      <input type="checkbox" name="checkbox_name" /> Label for checkbox.<br />

      Change "checkbox_name" and "Label for checkbox" to the appropriate name and label.

    • 3

      Save and view the HTML document.

Related Searches:

References

  • Photo Credit Jupiterimages/Photos.com/Getty Images

Comments

Related Ads

Featured