W3C home > Mailing lists > Public > www-validator@w3.org > June 2015

Re: [VE][64] Confusing error when title missing

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 14 Jun 2015 10:29:38 +0300
Message-ID: <557D2D62.9040608@cs.tut.fi>
To: www-validator@w3.org
2015-06-13, 3:53, Mellem, Dan wrote:

 > When validating:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
> <p> test
> You get the error:
> Error [64]: "document type does not allow element X here"

Specifically, “document type does not allow element "P" here”.

> However, it would be clearer to report that the <title></title> section is missing or show [VE][73], but this is only shows if there's a "</head>."

The lack of a TITLE element is indirectly reported: “"HEAD" not finished 
but document ended”. This refers to TITLE, since it is the only required 
child element of the HEAD element.

> Adding a title validates:


Changing the validator to report explicitly about the lack of a TITLE 
element would require a major change to its code, which now works 
basically as an SGML validator (for HTML 4.01 validation), and when an 
element is closed (perhaps implicitly as in this case), the validator 
only knows whether the element was completed (contained all the required 
children or not).

And most probably nobody is working the improvement of such validation 
(ever); improvement efforts relate to HTML5 validation, which is 
entirely different.

Received on Sunday, 14 June 2015 07:30:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:13 UTC