- From: Dmitry Beransky <dberansky@ucsd.edu>
- Date: Tue, 19 May 1998 10:52:24 -0700
- To: www-style@w3.org
So if I follow this correctly... Let's say I have a 640x480 image which I want to display as a thumbnail at 40x30 (for argument's sake, let's say I don't want to make a smaller copy). The correct markup would be: <IMG src="some.img" alt="Some picture of something." height="480" width="640 style="height: 30px; width:40px;"> Right? But wouldn't this break backward compatibility with non-CSS compliant browsers. Rendered by such a browser, the image will be 16x bigger. Regards Dmitry Beransky >I believe the term used for this is "intrinsic dimension". It is a simple >physical description of the image. It is explained in the CSS2 specs in >various locations. > >There is a difference if you interpret it carefully. Images are, typically, >a fixed size and that is necessary information to insert the image. The UA >can get this information from the image itself, of course. But, for many >reasons it seems like a generally good idea to include this information in >the markup itself. (For a good source of reasons look around the >accessibility areas of the W3C web.) The height and width attributes are >not for specifying what the height and width should be. They are for >specifying what the height and width are, thus part of the description of >the image. Such as alt, longdesc, etc. > >For instance: >You have a 200px X 200px image and want to resize it to 300px X 300px in the >UA for some reason. (Note: The way the CSS2 spec reads, the UA may scale the >image to fit the content-width box. The use of "may" implies that this >could depend on the UA or the UA's current display mode.) > >Incorrect markup: ><IMG src="some.img" alt="Some picture of something." height="300" >width="300"> >(The image should render at 200px X 200px, even though it is stated as >300px) > >Correct markup: ><IMG src="some.img" alt="Some picture of something." height="200" >width="200" style="height: 300px; width:300px;"> >(The image, or at least its containment box, should render at 300px X 300px) > >,David Norris > >World Wide Web - http://www.geocities.com/CapeCanaveral/Lab/1652/ >Illusionary Web - http://illusionary.dyn.ml.org/ <-- 02:00 - 10:00 GMT >Video/Audio Phone - callto:illusionary.dyn.ml.org >Page via mail - 412039@pager.mirabilis.com >ICQ Universal Internet Number - 412039 >E-Mail - kg9ae@geocities.com > >-----Original Message----- >From: www-html-request@w3.org [mailto:www-html-request@w3.org]On Behalf >Of Ian Hickson >Sent: Saturday, May 16, 1998 5:05 PM >To: www-html@w3.org >Subject: Are IMG height/width deprecated? Why not? > > >Nic Hughes (on the ciwah group) pointed out to me that the 'height' and >'width' attributes are NOT deprecated (in HTML4) according to the attribute >index. However, it seems to me that according to section 13.7 they *are*: > >>>13.7 Visual presentation of images, objects, and applets >>>All IMG and OBJECT attributes that concern visual alignment >>>and presentation have been deprecated in favor of style sheets. >>>13.7.1 Width and height >http://www.w3.org/TR/REC-HTML4/struct/objects.html#adef-width-IMG > >Since 'height' and 'width' on IMG are "override" heights and widths, they >certainly seem like "attributes that concern ... presentation". The >attributes are also present in the DTD. > >Is this an error in the DTD & attribute index (please say that it is!) or an >error in the text? CSS has been able to >specifiy height/width since the early CSS1 days, IMHO there is no reason for >height and width to stay. > >[Note: http://www.w3.org/MarkUp/html40-updates/html40-errata.html states >that the width attribute on PRE *has* been deprecated, as does the DTD. It >does not mention IMG's width/height attributes. Other IMG attributes, e.g. >vspace, are listed as deprecated in the attribute index.] > >-- >Ian Hickson >-----BEGIN GEEK CODE BLOCK----- >Version: 3.12 Info: www.geekcode.com >GIT/M/S d->-- s+: a--->? C++(+++)>$ U>*++++ P L+>+++++ E(+)>+++ W+++ N(+) o? >K? w@ O- !M V- PS+ PE- Y+ PGP>+ t 5+++>++++ X- R+(+++) tv b++(+++) DI++ >D++(---)>++++ G>+++ e(*)>+++++ h!()(--) !r y? >------END GEEK CODE BLOCK------
Received on Tuesday, 19 May 1998 13:53:33 UTC