W3C home > Mailing lists > Public > www-validator@w3.org > November 2011

Re: [VE][247] Add Subject Here

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 16 Nov 2011 18:32:26 +0200
Message-ID: <4EC3E59A.9000505@cs.tut.fi>
To: "www-validator@w3.org >> \"www-validator@w3.org\"" <www-validator@w3.org>
CC: Aneka Diskusi <diskusian@gmail.com>
2011-11-16 18:16, Leif Halvard Silli wrote:

>>> Warning Line 61, Column 68: NET-enabling start-tag requires SHORTTAG YES
>>>
>>> <img src="pic1.jpg" width="200" height="200" alt="alathitunguang1" />
>>
>> In other words, don't use "/>" to close<img>  tags in HTML 4.01
>> Transitional.
>
> My reading of the facts, puts the blame on the validator: It would not
> matter very much if the HTML4 validator had stopped issuing that
> warning. Especially now that HTML5 allows the use of "/>" to close
> <img>  tags. But even per HTML4's rules,  it is only a warning and not
> an error.

Per the rules of HTML 4.01, the construct is equivalent to
<img src="pic1.jpg" width="200" height="200" alt="alathitunguang1">>
which means that there is an extra ">" as data. Though this does not 
make the document invalid,

<base href=foo />

would do that, as the extra ">" would be inside the <head> element, 
where character data is not allowed. Similarly, with HTML 4.01 Strict,

<body><hr />

would be a syntax error, as it would mean

<body><hr>>

and in Strict, character data is not allowed as content directly inside 
<body>.

It can be argued, as many people do, that no browser actually implements 
HTML 4.01 in this respect. But software advertised to perform markup 
validation should do exact validation, without dropping some rules, 
especially if its reports specifically refer to HTML 4.01, in a rather 
formal tone at that.

Yucca
Received on Wednesday, 16 November 2011 16:32:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:49 GMT