[whatwg] <img> element comments

Ian Hickson ian at hixie.ch
Wed Aug 6 13:06:33 PDT 2008

On Wed, 30 Jul 2008, Matthew Paul Thomas wrote:
> >
> > I'm not sure that this usage of <img> is one that the spec today 
> > considers valid. Wouldn't <canvas> be the better way to do this?
> Indeed it wouldn't, because <canvas> wouldn't work in w3m at all!

Yeah, you're right, <canvas> wouldn't work particularly well for this.

<meter> is probably the right element for this. You can use fallback 
content in the <meter> element to show text in legacy browsers that don't 
support HTML5.

> And it seems a little excessive to need to construct a <canvas> when all 
> we want to do is stretch an image horizontally.

What you want to do is show a graph, not stretch an image. The image is 
just the way you've found to do it. However, I don't think it's a valid 
solution. You're saying that the meaning of the image is affected by the 
dimensions at which it is drawn, which seems very dubious since it means 
you would lose the meaning if you just copied the image, or if you lost 
the context (the width only means something relative to other widths), 

> So to reiterate Henri's point, given that browsers (I assume) have to 
> obey disproportionate width= and height= attributes for compatibility 
> with the Web anyway, I don't see the point of requiring authors to make 
> them match the image's proportions.

The point is to catch errors (aspect ratio mistakes) when authors are 
using HTML in a more appropriate manner.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list