- From: Mark D. Wood <mdw@itc.kodak.com>
- Date: Tue, 02 Sep 1997 14:26:31 -0400
- To: www-html@w3.org
Why doesn't the HTML4.0 spec support percentages for the height & width
attributes to the IMG tag? As I understand the spec (I've reproduced
the relevant portions below), the values for the HEI and WID
attributes must be expressed as absolute pixels.
I understand that in HTML 4.0, the OBJECT tag is the preferred way of
including images. However, given that IMG is still an option in 4.0,
and that a lot of browsers do support relative height and width
attributes now, it seems appropriate to have that standardized.
<Excerpts from HTML spec>
Lengths and Pixels
Values of the type "length" may either be specified as an integer
representing the number of pixels of the canvas (screen, paper) or as a
percentage of the available horizontal or vertical space. The HTML DTD
generally uses %Length for length values that permit percentages and
%Pixels for values that only permit pixels.
....
Including an image: the IMG element
<!-- To avoid problems with text-only UAs you need to provide
a description with ALT, and avoid server-side image maps -->
<!ELEMENT IMG - O EMPTY -- Embedded image -->
<!ATTLIST IMG
%attrs; -- %coreattrs, %i18n, %events --
src %URL #REQUIRED -- URL of image to embed --
alt CDATA #IMPLIED -- description for text only browsers --
align %IAlign #IMPLIED -- vertical or horizontal alignment --
height %Pixels #IMPLIED -- suggested height in pixels --
width %Pixels #IMPLIED -- suggested width in pixels --
border %Pixels #IMPLIED -- suggested link border width --
hspace %Pixels #IMPLIED -- suggested horizontal gutter --
vspace %Pixels #IMPLIED -- suggested vertical gutter --
usemap %URL #IMPLIED -- use client-side image map --
ismap (ismap) #IMPLIED -- use server-side image map --
>
Received on Tuesday, 2 September 1997 14:23:35 UTC