Re: <STYLE> considered harmful

Brian Behlendorf (
Sat, 18 Mar 1995 13:42:53 -0800 (PST)

On Sat, 18 Mar 1995, Luke Y. Lu wrote:
> I consider this STYLE tag harmful and redundant.
> Reasons:
> 1) It's illogical. Style is considered as attribute of content. This
> tag treat it _as if_ it _is_ content.

This is funny to hear coming from a fan of netscape tags :)

There has been hum and cry from many people for wanting style information
embedded directly in the document - this is an allowance for that. One could
also say that the META tag and the TITLE tag aren't content, but rather an
attribute of the document.

> 2) Directly embedding non-html stuff in html is a bad idea. we'd
> better refer them as foreign objects.

I don't see it as "non-HTML" any more than I'd see someone putting C code
between <PRE>'s into an HTML document as "non-HTML". What's between <STYLE>
and </STYLE> isn't markup, it's information to the browser which the browser
is given leeway to deal with, just like META and TITLE.

> 3) <LINK rel=style href="style1.dsssl"> is more than enough for the
> purpose. we can use more than one link to merge styles. With local
> caching, unnecessary merge operation can be avoided.

As Lou from netscape and others have pointed out, this is a big network
problem if every document with style information were forced to make an extra
request. The <LINK rel=style> is for situations where style information is
set for a collection of documents, or even situations where different forces
control the style and the content (with <STYLE> information overriding places
where they conflict). Allowing the embedding of style information is an
optimization, not a requirement.

> 4) Incompatibility. clients that do not recognize this tag will display all
> the dsssl-lite garbage on the screen because it is treated as if it's
> document content (see reason 1)

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.