W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

[whatwg] <img> element comments

From: Michel Fortin <michel.fortin@michelf.com>
Date: Fri, 3 Nov 2006 16:09:03 -0500
Message-ID: <495840D4-9A85-4BD7-AB95-DCC57FCACA93@michelf.com>
Le 3 nov. 2006 ? 8:38, Anne van Kesteren a ?crit :

> * The height and width attributes as defined are completely  
> presentational. I don't really see any value in keeping them. Now I  
> suppose they have to be supported anyway, but so does <body  
> bgcolor="">.

Except that, contrary to bgcolor, the height and width attributes can  
help solve a real problem: page jiggling while the images loads. It's  
somewhat like the type="image/jpg" attribute you can set for links:  
it gives advance information on what the external content is supposed  
to be.

In this case, height and width are inherent properties of the  
document if we consider the linked image as part of the document,  
much alike the type="" attribute on a link. Sure, we could use  
style="width: 32; height: 32" instead of width="32" height="32", but  
most of the time the size of an image isn't a matter of style, it's a  
matter of what the image is.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
Received on Friday, 3 November 2006 13:09:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:49 UTC