W3C home > Mailing lists > Public > www-style@w3.org > April 2004

Re: content: url() is bad

From: Dave Shea <dave@mezzoblue.com>
Date: Mon, 12 Apr 2004 09:25:02 -0500
To: www-style@w3.org
Message-Id: <E1BD2Mw-00020Q-3x@socrates.scdns.net>

> What's wrong with
> <h1><img alt="XYZ Company" title=
> "XYZ Company logo, designed by S. Alva d'Ordali"
> src="xyzcompany-logo"></h1>
> apart from the obvious (i.e., that we should really use
> <object>, if only it were reasonably defined and decently 
> implemented)?

No control of that element through the style sheet is the problem.

Given these two sample chunks of code:

<body id="homepage">
<h1>Welcome</h1>
</body>

<body id="contact">
<h1>Get in Touch</h1>
</body>

Dropping an image with the word 'Welcome' into the first h1 example
requires me to change markup for the second example. Given a decent
image replacement technique, I can do the following:

#homepage h1 {background: url(welcome.gif);}
#contact h1 {background: url(welcome.gif);}

Admittedly not much benefit in this small example, but when you're
building entire sites that vary quite a lot from page to page, control
of each page through the body id becomes an incredibly powerful tool if
the markup is kept to a bare, semantic minimum with no presentational
elements within. That's the benefit of image replacement.

> After all, a logo (as a specific appearance, specified by image 
> data) is content rather than stylistic variation.

Us designers aren't even sure about that. Arguments can be made either way.

> Admittedly, if you move to things like headings appearing in 
> a specific font, it might be reasonable to treat the 
> difference between an image and a text as stylistic only. But 
> in that case, wouldn't we need good tools for setting font 
> (e.g., via font embedding) rather than a kludge that replaces 
> text data by image data?

If you want to try cutting through the copyright issues around font
embedding, while making sure the full range of typographic control
offered by a professional image editor makes it into the spec (including
kerning and hinting), and work around the problem induced by fixed-pixel
background images not scaling along with the text, be my guest. In the
mean time, we'll continue to use that 'kludge' of replacing text with
images.

d.
Received on Monday, 12 April 2004 10:25:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:28 GMT