Are certain attributes of <img> and <object> deprecated?

The HTML 4.0 specification is unclear as to whether the width and height
attributes of the <img> and <object> element are deprecated. According to
www.w3.org/TR/REC-html40/struct/objects.html#h-13.7, "All IMG and OBJECT
attributes that concern visual alignment and presentation [presumably, this
includes height and width] have been deprecated in favor of style sheets."
However, the chart on www.w3.org/TR/REC-html40/index/attributes.html
indicates that they are not. Furthermore, they do appear in the Strict DTD
(both HTML 4.0 and XHTML), which "excludes the presentation attributes and
elements that W3C expects to phase out as support for style sheets matures."
There is nothing regarding this in the HTML 4.0 errata.

Most signs indicate that these attributes are not deprecated, however this
seems to fly in the face of the W3C's desire to get rid of presentation
HTML. I suppose, though, that these two attributes make more sense on <img>
and <object> than other elements, since images and objects take a while to
load, leaving the user agent without any formatting clues. Also, it would be
awkward to use CSS to assign width and heights, since documents often
contain many differently-sized images.

Benjamin Schak
benjamin@schak.com
http://www.schak.com/

Received on Saturday, 3 July 1999 00:40:06 UTC