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


and in Strict, character data is not allowed as content directly inside 

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.

Received on Wednesday, 16 November 2011 16:32:55 UTC

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