[whatwg] <img> element comments

Alexey Feldgendler alexey at feldgendler.ru
Sat Nov 4 09:01:44 PST 2006

On Sat, 04 Nov 2006 12:37:32 +0600, Ian Hickson <ian at hixie.ch> wrote:

>> * 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="">.

> I'm thinking of only allowing integer values, and requiring them to be
> equal to the dimensions of the image, if present (and requiring both to
> be present if either is present). Would people be ok with that?
> The use case is giving the UA information on the dimensions of the image
> before the image has been downloaded, the same as the type="" or
> hreflang="" attributes on the <link> element give information on the
> resource before the resource is fetched.

That's how these attributes could have been defined if we were designing  
HTML from scratch.

In today's browsers, specifying width and height on <img> different from  
the actual dimensions of the image forces the image to be resized for  
display. There is existing content which relies on this.

Alexey Feldgendler <alexey at feldgendler.ru>
[ICQ: 115226275] http://feldgendler.livejournal.com

More information about the whatwg mailing list