HTML DOM Input Checkbox defaultChecked Property Last Updated : 19 Sep, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 a Boolean value that returns true if the checkbox is checked by default otherwise returns false.Example: In this example we demonstrates the defaultChecked property of a checkbox, displaying whether the Checked by default checkbox was initially checked. The result is shown when the Submit button is clicked. HTML <!DOCTYPE html> <html> <head> <title> DOM Input Checkbox defaultChecked Property </title> </head> <body style="text-align:center;"> <h1 style="color:green;"> GeeksforGeeks </h1> <h2>DOM Input Checkbox defaultChecked Property</h2> <form id="myGeeks"> <!-- 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:25px;"></p> <!-- Script to return the Input Checkbox defaultChecked Property --> <script> function myGeeks() { var g = document.getElementById("GFG").defaultChecked; document.getElementById("sudo").innerHTML = g; } </script> </body> </html> Output: Supported BrowsersGoogle ChromeEdge FirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML | DOM Input Checkbox form Property M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads HTML | DOM Input Checkbox checked Property 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|f 2 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 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 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 Color defaultValue Property The DOM Input Color defaultValue Property in HTML DOM is used to set or return the default value of a Color picker. It is the value specified in the value attribute. Syntax: It returns the defaultValue property.colorObject.defaultValueIt is used to set the defaultValue property.colorObject.defaultVa 2 min read HTML | DOM Input Date defaultValue Property The Input Date defaultValue Property in HTML DOM is used to set or return the default value of a date 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 indicate the default value and the value contains 2 min read Like