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

[whatwg] <img> element comments

From: Rimantas Liubertas <rimantas@gmail.com>
Date: Sat, 4 Nov 2006 13:25:35 +0200
Message-ID: <5ccfb3340611040325k6906af39n7f343f1fd68de818@mail.gmail.com>
> >> * 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/
Received on Saturday, 4 November 2006 03:25:35 UTC

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