[whatwg] img as a layout tool to describe the displayed region of a CSS background-image

Ashley Sheridan ash at ashleysheridan.co.uk
Wed Apr 28 04:40:34 PDT 2010


On Wed, 2010-04-28 at 13:41 +0200, Giorgio Maone wrote:

> I believe the spec is trying to stigmatize old-times spacer images used 
> to layout other HTML elements, like
> 
> <img src="spacer.gif" width="100" height="1">
> 
> which are overly ugly and meaningless now that there's nothing you can't 
> layout by CSS.
> -- G
> 
> Ingo Chao wrote, On 28/04/2010 13.31:
> > 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)?
> >
> > Thanks.
> >
> >    
> 


But still, using a transparent image with some alt text to convey
information about a background image is just as bad. It's breaking the
relationship between content and the meaning of that content. A
background image should be just that, and shouldn't have any impact on
the meaning of information. Likewise, colour shouldn't be relied on to
convey information, as there are cases where colours can't be displayed
or aren't transferred if the information is grabbed as an excerpt to be
used elsewhere.

Thanks,
Ash
http://www.ashleysheridan.co.uk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100428/af1a2c13/attachment-0002.htm>


More information about the whatwg mailing list