HTML | DOM Input Checkbox checked Property Last Updated : 24 May, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The DOM Input Checkbox Property is used to set or return the checked status of a checkbox field. This property is used to reflect the HTML Checked attribute. Syntax: It is used to return the checked property.checkboxObject.checkedIt is used to set the checked property.checkboxObject.checked = true|false Property Values: true: It defines that checkbox is in checked state.false: It specify that the checkbox is not checked. It is false by default. Return Value: It returns a boolean value which represents that whether the checkbox is checked or not. Example: This example illustrates how to return the Checkbox Checked Property. HTML <!DOCTYPE html> <html> <head> <title>DOM Input Checkbox Checked Property</title> </head> <body style="text-align: center;"> <h1 style="color: green;">GeeksforGeeks</h1> <h2>DOM Input Checkbox checked Property</h2> <form> <!-- Below input elements have attribute "checked" --> <input type="checkbox" name="check" id="GFG" value="1" checked> Checked by default<br> <input type="checkbox" name="check" value="2"> Not checked by default<br> </form> <br> <button onclick="myGeeks()">Submit</button> <p id="sudo" style="color:green;font-size:20px;"></p> <script> function myGeeks() { let g = document.getElementById("GFG").checked; document.getElementById("sudo").innerHTML = g; } </script> </body> </html> Output: Before clicking on the button: After clicking on the button: Example-2: This example illustrates that how to check and uncheck the checkbox. HTML <!DOCTYPE html> <html> <head> <title>DOM Input Checkbox Checked Property</title> </head> <body style="text-align: center;"> <h1 style="color: green;">GeeksforGeeks</h1> <h2>DOM Input Checkbox checked Property</h2> <form> <!-- Below input elements have attribute "checked" --> <input type="checkbox" name="check" id="GFG" value="1">Checked by default<br> <input type="checkbox" name="check" value="2">Not checked by default<br> </form> <br> <button onclick="myGeeks()">checkt</button> <button onclick="Geeks()">Uncheck</button> <script> function myGeeks() { let g = document.getElementById("GFG").checked = true; } function Geeks() { let w = document.getElementById("GFG").checked = false; } </script> </body> </html> Output: Before clicking on the button: After clicking on the check button: After clicking on the uncheck button: Supported Browsers: The browser supported by DOM input Checkbox Checked Property are listed below: Google ChromeEdge 12 and aboveOperaApple SafariMozilla Firefox Comment More infoAdvertise with us Next Article HTML | DOM Input Checkbox disabled Property M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads HTML DOM Input Checkbox defaultChecked Property The defaultChecked property in HTML DOM reflects the default checked state of an input checkbox as specified in the HTML. It indicates whether the checkbox was initially selected or not, without reflecting changes made after the page loads.SyntaxcheckboxObject.defaultCheckedReturn Values: It returns 2 min read HTML | DOM Input Checkbox form Property The Input Checkbox form property in HTML DOM is used to return the reference of form containing the input Checkbox field. It is read only property that returns the form object on success. Syntax: checkboxObject.form Return Values: It returns a string value which specify the reference of the form con 1 min read HTML | DOM Input Checkbox disabled Property The Input Checkbox disabled property in HTML DOM is used to set or return whether the Input Checkbox field must be disabled or not. A disabled checkbox is unclickable and unusable. It is a boolean attribute and used to reflect the HTML Disabled attribute. Syntax: It returns the Input Checkbox disabl 2 min read HTML | DOM Input Checkbox type Property The Input Checkbox type Property in HTML DOM is used to return that which type of form element the checkbox is. For a checkbox input field, this Property was always return only "checkbox". Syntax: checkboxObject.type Return Value: It returns a string value which represents the type of form element t 1 min read HTML DOM Input Checkbox value Property HTML DOM Input Checkbox Value property sets or return the value of the value attribute of an input checkbox field, however the contents of the value attribute does not shown to user. It manages their assigned value, reflecting their state when checked or unchecked. It retrieves or sets the value att 3 min read HTML | DOM Input Checkbox defaultValue Property The DOM Input Checkbox defaultValue Property is used to set or returns the default value of an Input Checkbox field. This property is used to reflect the HTML value attribute. The main difference between the default value and value is that the default value indicates the default value and the value 2 min read Like