Re: Validator does not report improperly terminated tags

David Dorward wrote:

> Paragraphs contain zero or more (various things). It is valid.
> (Nonsense, but still valid)

Paragraphs with empty content are not quite nonsense. The HTML 4.01 spec 
mentions them as something that browsers should ignore and authors should 
not use, but between the lines, it becomes apparent that empty paragraphs 
have often been used for formatting, to create empty vertical space. It's a 
bad idea (though it may have been understandable in ancient, pre-CSS times), 
but not nonsensical.

>>  Nevertheless, the w3c validator reports it as valid.  Validator.nu
>> does
>> report the improperly terminated paragraph tags as errors.
>
> That looks like Appendix C checking.

Yes, it's an appendix C issue. But the XHTML DTDs allow the use of <foo/> 
for any element foo, so validators are required to accept them (not report 
an error).

Validator.nu is not a DTD-based validator but a heuristic checker for some 
varying version of the HTML5 draft.

Yucca 

Received on Wednesday, 3 August 2011 18:59:35 UTC