> 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 : "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], 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