the STYLE attribute

Hakon Lie ([email protected])
Fri, 10 Nov 1995 13:57:48 +0100


Peter writes

> Glenn writes:
>
> > I just returned from the W3C style sheet workshop where we discussed
> > this in some detail. I opposed (and continue to oppose) using
> > a STYLE attribute in the STRONGEST POSSIBLE TERMS! If it is necessary
> > for a particular elemennt to be associated with a style rule, then one
> > of two mechanisms should be used in the context of CSS:
>
> I support this view wholeheartedly.
>
> > The use of a STYLE attribute is *A BAD THING*, as it encourages the
> > continued intermixture of presentation/appearance specifications with
> > content. Style sheets are supposed to provide a way to move away from
> > this mess, not continue to feed it.
>
> How can we promulgate this? A STYLE attribute is a step BACKWARDS.
> Who on earth is supporting it?

A number of good people. As Glenn reports, the issue was discussed at
length at the Style Sheet workshop [1]. The notes from the workshop
are right now being typed in but will be screened by participants
before publishing.

Main argument against:

- the STYLE attribute mixes presentational information into the
structure of the docuement. This is just what style sheets try to
avoid, and the attribute is therefore counter-productive.

Arguments for:

- one STYLE attribute is better than ten new visual tags.

- it will be an introduction to style sheets and lead people to the
real thing. The same notation can be used in both the attribute and
the style sheet proper.

I think this is one crucial compromise we have to make if we want to
see style sheets realized on the web. There is a danger that authors
never get past the attribute, but we'll have to take that chance. If
implementations support both style sheets and the STYLE attribute, it
shouldn't be too hard for authors to see which gives you the best
milage.

The STYLE attribute is mentioned in the latest Cascading Style Sheets
draft specification [2] as one of several ways to reference styles.

[1] http://www.w3.org/pub/WWW/Style/951106_Workshop/
[2] http://www.w3.org/pub/WWW/Style/css/draft

Regards,

-h&kon

Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France
http://www.w3.org/People/howcome [email protected]