For the life of me I cant set my CheckBox to checked at page load.
I have tried adding value=\"true\"
and Checked=\"checked\"
after id and still noth
You're looking for the checked
content attribute. Here's the relevant snippet from the official documentation: (Living Standard):
The checked content attribute is a boolean attribute that gives the default checkedness of the input element. When the checked content attribute is added, if the control does not have dirty checkedness, the user agent must set the checkedness of the element to true; when the checked content attribute is removed, if the control does not have dirty checkedness, the user agent must set the checkedness of the element to false.
Note the docs have links to definition of relevant terms.
If it seems too technical, you can always go to MDN page on checked. MDN contributors have put up considerable effort into "translating" HTML Standard into more readable/understandable form (often times with examples), especially useful to people without a solid foundation on web related terminology and concepts.
Note: You'll also find the direct answer to your question on MDN.