[whatwg] <img> element comments

Rimantas Liubertas rimantas at gmail.com
Sat Nov 4 03:25:35 PST 2006


> >> * 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 disagree.  Specifying the size is very good for incremental rendering,
> but the alternatives are awful.

+1 on that.

>
> 1. <img ... style="height: 100px; width: 100px;">
>
> The style attribute is far more presentational than the height and width
> attributes.
>
> 2. <img ... id="foo">
>
> #foo { height: 100px; width: 100px; }
>
> This is simply not feasible in most cases, unless there are very few
> images on the site.  Think about flickr, it just wouldn't be possible to
> specify the dimensions of all their images in a stylesheet.

Another thing is that with height and width attributes information
about image size is
available at once, when in case of CSS it is available only after
stylesheet file is loaded
and parsed.
As for  style="..." I wish there wasn't such thing...


Regards,
Rimantas
--
http://rimantas.com/



More information about the whatwg mailing list