W3C home > Mailing lists > Public > www-style@w3.org > August 2002

Re: Why is the style tag restricted to the head?

From: Bert Bos <bert@w3.org>
Date: Sat, 10 Aug 2002 00:06:27 +0200
Message-ID: <15700.15587.856632.697494@jfouffa.inria.fr>
To: <www-style@w3.org>

Joshua Prowse writes:

> The main reason that I'd like something like this is because:
> - I don't have access to the <head> of my documents.  For example, when I'm
> posting on a UBB-style bulletin board or when I'm using a blogger tool I'd like
> to be able to modify document style without being restricted to inline style=""
> elements that don't allow for selectors.
> - and Javascript syntax is clumsy for changing styles

HTML (and the Web in general) is made such that the "unit of
information" is one document with one HEAD and one BODY. If you want
compound documents, made up of multiple independent sub-documents, the
way to create them is to use URLs and various kinds of links.

For your example, the OBJECT element would provide the right kind of
link. Each OBJECT tag links to one document that has its own HEAD and
BODY (and thus also it own style), while the typical display of OBJECT
puts the sub-document visually inside the parent document.

For example, the CSS test suites use this principle. Each test
consists of a parent document that explains the test and links to the
next and previous ones and which has an OBJECT element in which the
actual test lives, with its own style sheet.

Besides using links, there are various other ways to create compound
documents (zip, jar and tar files, MIME multipart files). Making HTML
into yet another, more restricted one seems unnecessary. Besides, I
think HTML works best if it is kept simple.


And maybe you should also look at it from the perspective of the
author of the bulletin board to which you are contributing: he might
not like every paragraph that is added to have its own style. He
probably only allowed paragraphs to be added precisely to *avoid* that
people would add style elements...



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Friday, 9 August 2002 22:10:39 GMT

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