- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 28 Apr 2010 11:43:40 -0700
On Wed, Apr 28, 2010 at 4:31 AM, Ingo Chao <i4chao at googlemail.com> wrote: > http://dev.w3.org/html5/spec/Overview.html#the-img-element > "The img must not be used as a layout tool. In particular, img > elements should not be used to display transparent images, as they > rarely convey meaning and rarely add anything useful to the document." > > An img with a given transparent image for src cuts an area of a sprite. > ( = img as a layout tool to describe the displayed region of a CSS > background-image.) > > Is this usage of the img element considered invalid (non-conforming)? Yes, this is using the <img> as a layout tool. Specifically, you're using the <img> to avoid specifying "width" and "height" in CSS, and to enable further layout hacks with sprites using background-positioning. ~TJ
Received on Wednesday, 28 April 2010 11:43:40 UTC