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

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 UTC