Direct formatting STYLE attribute

Paul Prescod (papresco@calum.csclub.uwaterloo.ca)
Thu, 7 Dec 1995 13:47:28 -0500


>Example: I have a table presenting the results of a scientific study; I
>want to call out three pairs of columns to talk about in the text, by
>presenting them in three different background colors. There is no
>"meaning" to the colors. The styling will not be used anywhere else in
>the document. With a STYLE attribute I can put "STYLE={color: xxx}" on
>each of the three column groups and be done with it. If all styles must
>go through a stylesheet, I must include a STYLE element (possibly
>otherwise unneeded) in the HEAD of the document, define three classes
>in it (with the wonderfully significant class names "red," "green," and
>"blue"), and then apply those classes to the colgroups.

Are they really just "red," "green," and "blue?"

Or are they CLASS="first_example", CLASS="second_example",
CLASS="third_example". The latter is quite useful to someone reading your
paper through a speach synth. The former is not.

You may have thought this through, and decided that "red," "green," and
"blue" are the most meaningful names you can come up with. But what
percentage of the population is that knowledgable about device-independant
content presentation? Forcing them to go to the header may trigger some
thought about the issue. "Carol, why does HTML force me to declare styles
like this?" "Because you are supposed to use meaningful names for your
classes so that your documents will be useful to people using display
devices you have not thought about."

Similarly, HTML's limited formatting commands is a powerful pedagogic tool.
In online and offline fora all over the world the question "why can't I make
blue text" is answered every day. When it is explained, some respond: "I
don't care. I just want to make blue text." Some reply: "Interesting idea.
Where can I learn more about this structual markup." Many of today's
proponents of structural markup started out this way.

When you are trying to move people to a new paradigm, you must make it
difficult to slip back into the old one. I would guess that that is why
SmallTalk and Java don't have functions, and why ANSI C has strong type
checking.

The proposed STYLE attribute allows you to do your "red", "green", "blue"
thing and still serves this educational purpose. It seems like a good
compromise to me.

Paul Prescod