Re: <STYLE> considered harmful

Luke 路客 (ylu@ccwf.cc.utexas.edu)
Sat, 18 Mar 1995 21:41:36 -0600 (CST)

On Sat, 18 Mar 1995, Christian Mogensen wrote:
>Brian Behlendorf wrote:
>>>Nope, it's in the <HEAD>, so even a conformant 2.0 browser won't display it
>>>at all. Netscape and I believe all the Mosaics handle this fine.
>
>__Luke writes:
>>Yeah, you "believe". Have you really tried? lynx, netscape all displayed
>>the dsssl-lite garbage. Besides, you know most html pages out there
>>conveniently omit HEAD...
>
>Duh! This is bogus. Most pages out there don't include <STYLE>..</>
>either, so that's a non problem. With content negotiation the server

It _is_ a problem, though it's only one less important of the problems.
Point some browsers to the example style page:

http://www.w3.org/hypertext/WWW/Arena/style.html

and see how many of them do not display the this garbage:

# If you don't know why you see this line, you should probably upgrade to
Arena 0.96n h1: align = right h1: color.text = #F0F0A0 h1: color.background
= #900000 h1: margin.left = 0 h1: margin.right = 60 h1: margin.top = 20 h1:
margin.bottom = 20 h2: align = left h2: color.text = #900000 h3: align =
left h3: margin.left = 0 h3: color.text = #900000 ul: indent = 20 ul:
margin.left = 30 ul: margin.top = 4 ul: margin.bottom = 4 ul: color.text =
#000000 dl: margin.left = 30 p: margin.left = 100 p: color.text = #000000
address: color.text = #0000F0 address: color.background = #00F000 address:
align = right address: margin.left = 0 address: margin.right = 100 math:
color.text = #0000C0 em: color.text = #F00000 a: color.text = #F000A0 h4:
margin.left = 0 h5: margin.left = 0 h6: margin.left = 0

If you really want to embed style sheet in a logical way, META is enough:

<META NAME=style NOTATION=dsssl-lite VALUE="
h1: align=right
..
h6: margin.left = 0">

>can decide whether or not serve a <STYLE>ified document to broken
>browsers. i.e. unless the browser specifies ACCEPT text/html;version=2.0
>the server can either tell it 'bug off and get a better browser' or it can
>strip out the <STYLE></> info on the fly orit can serve an alternate version
>of the document if it has one defined (CERN's multi facility).

Content negotiation is orthogonal to good/logical tag design. Content
negotiation is NOT an excuse of stuff like the STYLE hack. The STYLE tag
is not good and/or logical, period.

__Luke