It's meant to be read/parsed as `type="checkbox"`, `switch="true"`, `checked="true"`, `class="special"`. They're different attributes, not a long `type` attribute without quotes.
It's meant to be read/parsed as `type="checkbox"`, `switch="true"`, `checked="true"`, `class="special"`. They're different attributes, not a long `type` attribute without quotes.
checked="checked"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/in...
That's not how the value of the checked attribute works. It's already messed up enough.
> The value attribute is one which all <input>s share; however, it serves a special purpose for inputs of type checkbox: when a form is submitted, only checkboxes which are currently checked are submitted to the server, and the reported value is the value of the value attribute. If the value is not otherwise specified, it is the string "on" by default.
It is roughly/conceptually how the "checked" attribute works, in that boolean attributes provided by name but without a value will be set/truthy.
From the link you gave:
> checked
> A boolean attribute indicating whether this checkbox is checked by default (when the page loads).
What you quoted is how the "value" attribute works, which is entirely irrelevant to how the "checked" attribute works.