I’m trying to move this site from transitional to a strict doctype and it doesn’t like this form (at least it didn’t throw an error until I added the form).
Line 249, Column 565: document type does not allow element “INPUT” here; missing one of “P”, “H1”, “H2”, “H3”, “H4”, “H5”, “H6”, “PRE”, “DIV”, “ADDRESS” start-tag
Line 249, Column 566: character data is not allowed here
Line 249, Column 618: document type does not allow element “INPUT” here; missing one of “P”, “H1”, “H2”, “H3”, “H4”, “H5”, “H6”, “PRE”, “DIV”, “ADDRESS” start-tag
Line 249, Column 624: end tag for “FORM” which is not finished
Sounds like your HTML isn’t marked up correctly before or after the form itself as that looks perfectly valid, could you please re-post your link as it currently doesn’t work.
You have a <p> around the submit button but not around the previous input. If you put a <p> around that too, the page will validate. I’d use a div instead, but it’s up to you:
I know you can’t know, but how could I not know that???
I’ve never wrapped inputs in a <p> before. Is there a ref for that? This is a pretty basic omission. It would be nice to get some idea how I missed that. Maybe it’s just the “strict” that forced the issue for me finally.
Yeah, it’s just a silly thing with form inputs that they need to be wrapped in some kind of block element to be “valid”. (They work fine with or without it.) I don’t see the point of it. Anyhow, yes, it’s probably a strict rule.