|
Posted by Alan J. Flavell on 05/15/06 22:26
On Tue, 16 May 2006, ironcorona wrote:
> > I've cross-posted this to alt.html.
I've proposed narrowing f'ups to alt.html
> > My advice would be the opposite of yours: include image width and
> > height in the img element, and don't use them to change the size
> > of an image.
My general advice would be similar, although there are situations
where I would consider that proposing a size via CSS in some other
units than px could be useful (em units, in particular, scale with the
size of text).
> The spec agrees.
Does it? The HTML spec seems to me to face both ways (might go so far
as to say it contradicts itself...)
> http://www.w3.org/TR/REC-html40/struct/objects.html#visual
>
> "The height and width attributes give user agents an idea of the
> size of an image or object so that they may reserve space for it and
> continue rendering the document while waiting for the image data."
Indeed. But that's only after it said:
| When specified, the width and height attributes tell user agents to
| override the natural image or object size in favor of these values.
which seems to me to carry a quite different message. Anyway, it's a
specification, not a recommendation :-}
What's more intriguing is that the HTML (N.B *HTML*) height and width
attributes are specified to be a %Length, which in turn is specified
to be either a percent or a %Pixel; and when we follow that up, we
get to http://www.w3.org/TR/REC-html40/types.html#type-pixels
where the *HTML* pixel is normatively defined, so help me, by the
CSS/1 definition of a pixel - which, as we know, is defined to be
scaled to the resolution of the viewing situation
So, I thought (and maybe you thought?) that the job of these
attributes in HTML was to declare the natural size of the image? Just
as the job of all/most of the non-deprecated features of HTML are to
specify the inherent nature of the content, as opposed to one
particular way of presenting it? But the HTML specification tells
rather a different story, in this case.
Navigation:
[Reply to this message]
|