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

Giorgio Maone g.maone at informaction.com
Wed Apr 28 04:41:07 PDT 2010


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.
>
>    



More information about the whatwg mailing list