[thelist] Validation question

Peter-Paul Koch pp.koch at gmail.com
Sun Sep 4 12:05:56 CDT 2005


I just tried to port http://www.quirksmode.org/css/displayimg.html to
valid XHTML 1.0 . However, in doing so I encountered a very weird
validation error.

The page structure is:

[body]

[img /]

[div][img /][/div]

[/body]

Both images have an onload event handler, because I need it for this
particular test.

The validator gives an error stating that the first image, directly in
the body, may not have an onload attribute. It's silent about the
second image, though, the one in the div.

Can anyone explain this oddness? Either an [img /] element is allowed
an onload attribute, or it isn't, I'd say.

-- 
-------------------------------------------------------------------
ppk, freelance web developer
http://www.quirksmode.org/
------------------------------------------------------------------


More information about the thelist mailing list