This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1065 - Untrue error statement
Summary: Untrue error statement
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.6.7
Hardware: PC Linux
: P2 trivial
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
URL: http://webworks.hdcompany.nl/cgi/engi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-28 14:33 UTC by Hartog C. de Mik
Modified: 2005-01-29 12:38 UTC (History)
0 users

See Also:


Attachments

Description Hartog C. de Mik 2005-01-28 14:33:47 UTC
At the given URL the validator complains of an unclosed </p>, yet this is not
true... (I checked it twice)

What is true; the html is not valid html-4.01-transitional, since the <p> tag
contains a block-element (<form> to be precise). Instead of saying something
like '<form> not allowed in <p>' you get a nice wild-goose-chase message.

I tried the same with more simplified HTML
(http://webworks.hdcompany.nl/test.html) but this gave the same results.
Comment 1 Ville Skyttä 2005-01-29 12:38:00 UTC
The validator does not complain about an unclosed <p>, it's telling you that you
have a </p> end tag for which you don't have an opening <p> for.  Which is
indeed what you've got.

</p> is optional in HTML 4.x, and because <p> cannot contain <form>, it is
implicitly closed just before the form begins.  You'll see this by checking the
"show parse tree" checkbox in the results view and revalidating.  IOW, the
following two are equivalent in HTML 4.x:

  <p><form>...</form></p>
  <p></p><form>...</form></p>

The syntax of X(HT)ML is more explicit, so in case you wish to avoid pitfalls
like this and other similar ones, looking into it might be a good idea.