[thelist] validating forms to html 4.01 strict

Peter-Paul Koch gassinaumasis at hotmail.com
Tue Nov 12 11:08:01 CST 2002


> > Can anyone tell me why form elements have to be enclosed in a
> > <p></p> to validate as html 4.01 strict? I know that it's like that
> > in the html spec but why? Why can't we just have all the elements
> > in the <form></form> tags? At first I thought it was probably a
> > block/inline thing but I don't think it is now.
>
>It is a block/inline thing. Straight from the DTD:
>
><!ELEMENT FORM - - (%block;|SCRIPT)+
>
>The rules say that a <form> element can only directly contain elements that
>are designated as BLOCK (or scripts).

What a completely ridiculous rule. Sorry for the OT post, but I really had
to say this.

>So, a <form> can only directly contain one of those elements. Now, as to
>"why", none of us are privy to the W3's decision making when it came to
>allowing elements in forms. But, dem's the rules, and we have to follow
>them if we want validation.
>
>http://www.w3.org/TR/html401/sgml/dtd.html

Which is one of the most serious issues I have with this whole validation
stuff. My advice to the original poster: If the standards don't make sense,
ignore them.

In fact, in a recent interview I talked about this issue at endless length.
See http://netdiver.net/interviews/peterpaulkoch.php if you're interested.

--------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
New: Interview by Carole Guevin:
http://netdiver.net/interviews/peterpaulkoch.php
--------------------------------------------------


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the thelist mailing list