[whatwg] require img dimensions to be correct?

Sander Tekelenburg tekelenb at euronet.nl
Sun Mar 4 09:25:28 PST 2007


At 19:58 +0000 UTC, on 2007-03-03, Ian Hickson wrote:

> On Sat, 3 Mar 2007, Elliotte Harold wrote:

[...]

>> I'm +1 on allowing percentages. That seems like a useful feature to me.

Allowing percentages would be entirely presentational and thus have no place
in HTML.

> The question isn't whether or not you should have the ability to scale
> images; it's clear that this is desirable. The question is whether it
> makes sense to put this in HTML as opposed to CSS. Why would HTML be the
> place to put this? If we put this in HTML, how can we still drop <font>,
> <table border>, <td width>, etc?

We struggled with this for the WRI requirements[*]. We seem to be settling on
requiring a width and height to be specified in HTML, because as nice as CSS
is, Web pages must not be CSS-dependant. Even if the author means to provide
CSS, it might not be available (network/server error; saving and local
viewing of the HTML file; User CSS overrides) (A followup requirement would
probably have to be that when CSS is available, and specifies IMG size in px,
it must be the same as the size specified in the HTML.)

The only other sensible option would be to completely disallow width and
height in HTML. But that will result in 'jumpy rendering' because browsers
can't allocate the proper rendering space until the image's dimensions are
known.


[*] <http://webrepair.org/02strategy/02certification/01requirements.php> Btw,
this is our initial take. We very much welcome community feedback.


-- 
Sander Tekelenburg
The Web Repair Initiative: <http://webrepair.org/>



More information about the whatwg mailing list