joined:July 4, 2007
I don't know what I'm doing wrong here but if I have my checkbox checked and then try to validate the html it fails with this error:
The value of the attribute is defined to be one of a list of possible values but in the document it contained something that is not allowed for that type of attribute. For instance, the “selected” attribute must be either minimized as “selected” or spelled out in full as “selected="selected"”; a value like “selected="true"” is not allowed.
My code is
<input type="checkbox" checked="yes" class="check" name="my-checkbox" value="my-checkbox" />
I'm using the XHTML 1.0 transitional doctype
Not quite sure why I've never run into this before - but then again, perhaps because I've never had the checkboxes checked on entry to the page.
Any help would be greatly appreciated