W3C home > Mailing lists > Public > www-validator@w3.org > January 2007

Re: onload issue with an image

From: olivier Thereaux <ot@w3.org>
Date: Mon, 22 Jan 2007 13:28:21 +0900
Message-Id: <DE749DD6-264C-4899-A4B2-E304C6A74B4E@w3.org>
Cc: www-validator@w3.org
To: C.Quilliot <c.quilliot@free.fr>


On Jan 22, 2007, at 04:34 , C. Quilliot wrote:
> The validator reports that "the attribute is not a valid  
> attribute", whereas the W3 school states it is a valid attribute  
> for an element of type <img>:
> http://www.w3schools.com/htmldom/event_onload.asp
>
> So, which one is right ?

Unfortunately, and that's way too frequent, w3school (which by the  
way is not affiliated with W3C), is wrong:

[[ The onload event occurs when the user agent finishes loading a  
window or all frames within a FRAMESET. This attribute may be used  
with BODY and FRAMESET elements. ]]
-- http://www.w3.org/TR/html401/interact/scripts.html#events

onload cannot, in any standardized version of HTML, be used with the  
<img> element.

Regards,
-- 
olivier
Received on Monday, 22 January 2007 04:29:30 GMT

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