How to add a checkbox in forms using HTML ? Last Updated : 29 Sep, 2021 Comments Improve Suggest changes Like Article Like Report In this article, we will learn how to add a checkbox in HTML Forms. Basically, the checkbox is used to select one or more options from a variety of options. It is a multi-control unit that will be presented as a small square box on the screen. Normally, Checkbox has 3 states namely- Checked, unchecked & indeterminate. It is required in forms when the user allows choosing multiple choices. Approach: We have a simple approach to complete the task that given below- Firstly, create an HTML document that contains a <input> tag.Now use the type attribute with <input> element.Set the type attribute to value "checkbox"Syntax <input type="checkbox"> Example: HTML <!DOCTYPE html> <html> <head> <title> How to add a checkbox in forms using HTML? </title> </head> <body style="text-align: center;"> <h1 style="color:green;"> GeeksforGeeks </h1> <h2> How to add a checkbox in forms using HTML? </h2> <form> <h4> choose any your 2 favourite Dishes </h4> Rajna chawal --> <input type="checkbox" name="dish1" id="GFG" value="Rajma chawal" checked> <br> Shahi paneer --> <input type="checkbox" name="dish2" value="Shahi paneer"> <br> Kadi Chawal --> <input type="checkbox" name="dish3" value="kadi Chawal"> <br> Idli Sambhar --> <input type="checkbox" name="dish4" value="Idli sambhar"> <br> <input type="submit" value="submit"> </form> <br> </body> </html> Output: Comment More infoAdvertise with us Next Article How to add a checkbox in forms using HTML ? M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Tags HTML-Attributes HTML-Questions +1 More Similar Reads How to add Radio Buttons in form using HTML ? In this article, we will learn how to add Radio Buttons in form using HTML. We know that Radio Buttons are used to select only one option out of several options. It is generally used in HTML form. If we want to deselect any option we have to select another option in the case of a radio button. Appro 1 min read How to Create a Checkbox in HTML? The checkbox is the HTML form element that lets users select one or more options from predefined choices. It can often be used when a user selects multiple items in the list. Checkboxes can be checked or unchecked, and they are created using the <input> tag with the type attributes set to the 3 min read How to Add Checkbox in HTML Table ? Adding checkboxes to an HTML table can be useful for various purposes, such as selecting multiple rows for batch processing or toggling the state of individual items. In this article, we will explore two methods to add checkboxes to an HTML table i.e. using basic HTML and JavaScript for dynamic inte 2 min read How to define a form for user input using HTML5 ? In this article, we will learn how to create a form in a webpage by using the <form> tag. This tag is used to create form for user input. Also there are many elements which are used within form tag. Syntax: <form> Form Content... </form> Example: The following code snippet demonstr 1 min read How to validate checkbox form in angular 15 In Angular applications, it is often necessary to validate form inputs to ensure that users provide the required information correctly. Checkbox inputs are commonly used to allow users to select one or more options from a list. This article will cover different approaches to validating checkbox inpu 5 min read Create a Custom Checkbox using HTML CSS and JavaScript This article will show you how to create a custom checkbox using HTML, CSS, and JavaScript that enables users to check on checkboxes along with the " Select all " feature. We have written a code that generates a card in the center of the window. The card displays a list of items along with checkboxe 4 min read How to find all checkbox inputs using jQuery ? The task is to find all the checkbox input using jQuery. Checkboxes are the square boxes that are ticked when activated, and it is used to select one or more number of choices. Method and Selectors used: :checkbox: This selector is used to select the input element with type = checkbox. .wrap(): This 2 min read How to define a label for an input element using HTML? To define a label for an input element in HTML5, use the <label> tag. This tag enhances usability by allowing users to click on the label text to toggle the associated input control. The <label> tag should include a for attribute that matches the id of the input element, ensuring a clear 1 min read How to Set Checkboxes Readonly in HTML ? In this article, we will learn whether it is possible to make checkboxes readonly in HTML or not. Checkboxes are commonly used to allow users to select multiple options from a set of choices. They are represented in HTML by the <input> tag with the type="checkbox" attribute. It is not possible 4 min read How to make a Disabled Checkbox using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a Disabled Checkbox using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ 1 min read Like