HighDots Forums  

w3c validator errors on form tag

alt.html.tags alt.html.tags


Discuss w3c validator errors on form tag in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ruud habets
 
Posts: n/a

Default w3c validator errors on form tag - 08-31-2003 , 02:34 AM






i am using the w3c validator to check my website. on this website is a
simple search form:

<div>
<form enctype='multipart/form-data' action='./zoek.php' method='post'>
<input type='text' size='15' name='crit'>
</form>
</div>

the validator errors:

document type does not allow element "INPUT" here; missing one of "P",
"H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag

and is showing the point of error at the end of 'crit'

does anybody know what is going on?

thnks

ruud habets

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Reply With Quote
  #2  
Old   
Toby A Inkster
 
Posts: n/a

Default Re: w3c validator errors on form tag - 08-31-2003 , 03:42 AM






ruud habets wrote:

Quote:
as i found on the net (not at w3c)
strict html requires a <p></p> or another one, as listed above, around the
input tag.
There is a new beta version of the W3C validator with friendly error
messages (yay!):

http://validator.w3.org:8001/

--
Toby A Inkster BSc (Hons) ARCS | mailto:tobyink (AT) goddamn (DOT) co.uk | pgp:0x6A2A7D39
aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:tai (AT) jabber (DOT) linux.it
http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
playing://(nothing)


Reply With Quote
  #3  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: w3c validator errors on form tag - 08-31-2003 , 06:48 AM



ruud habets <kiosk (AT) xs4all (DOT) nl> wrote:

Quote:
document type does not allow element "INPUT" here; missing one of
"P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS"
start-tag

as i found on the net (not at w3c)
strict html requires a <p></p> or another one, as listed above,
around the input tag.
This particular error message has been admitted to be misleading
(actually, plain wrong) but not fixed yet. (It lists a few elements that
may validly appear as sub-elements of <form>, but it omits several of
them, and many of those listed should normally not be used inside a form,
for semantic reasons.)

But you're on the right track. The Strict DTD has a "stricter" content
model for <form>. You just shouldn't use any markup just because a
validator "requires" that. In particular, don't use <p> markup unless you
really have a _paragraph_. Instead, you may consider using <div>, or
<fieldlist>.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.