Re: www-html-d Digest V96 #60

>Tom Scott <OnSiteCPU@aol.com> writes:
>>> why not just use an INSERT tag to include a style definition....
>>>
>>> <STYLE>
>>>      <BODY BACKGROUND=#000000>
>>>      <STYLE NAME=H2>
>>>      <FONT SIZE=12 FACE=Times,Serif COLOR=#FFFFFF>
>>>      </STYLE>
>>>      <STYLE NAME=H3>
>>>      <FONT SIZE=10 FACE=Times,Serif COLOR=#FFFFFF>
>>>      </STYLE>
>>> </STYLE>
>>
>>Let's compare this with CSS:
>>
>><STYLE>
>>  BODY { background: black }
>>  H2   { font-size: 12px; font-family: times serif; color: white }
>>  H3   { font-size: 10px; font-family: times serif; color: white }
>></STYLE>
>>
>>In my (biased) eyes, the CSS syntax seems more intelligible. How would
>>you mark up context-sensitive selectors in your syntax?
>
>One problem with the latter, is that incompatible browsers would display the
>text inside the <style></style> container.  Whereas, the fully tagged format
>would just be ignored by those same browsers.

Use of any type of stylesheets assumes current browsers understand them. If
the issue is backwards-compatibility, you'll note that the STYLE element is
not allowed within BODY, only HEAD. Hence, the former example showing BODY
elements within STYLE is invalid. One good reason not to embed the style
information in the document itself (ie., refer to an external stylesheet
instead) is that:

   1. older browsers won't display the embedded stylesheet noise since it
      isn't in the document
   2. you can take advantage of the modularity and reusability of external
      stylesheets
   3. you aren't locking yourself into one stylesheet format by embedding
      the information in your documents -- maintenance is simplified.
   4. you will be able to make ALL your documents consistently and equally
      beautiful or ugly (eye of the beholder and all that)
   5. you will be a very cool person indeed

(Well, the last one is conjecture on my part...)

If you have any confusion over which elements are allowed within which
elements in whatever HTML DTD you might be using, you could check a page I
maintain that contains browseable versions of all (these were created using
Earl Hood's 'dtd2html' perl script -- my thanks to Earl...):

    http://www.stonehand.com/doc/

It's still in development, but the DTD section does contain the
aforementioned browseable DTDs. Suggestions welcome.

Murray

```````````````````````````````````````````````````````````````````````````````
     Murray Altheim, Program Manager
     Spyglass, Inc., Cambridge, Massachusetts
     email: <mailto:murray@spyglass.com>
     http:  <http://www.stonehand.com/murray/murray.html>
            "Give a monkey the tools and he'll eventually build a typewriter."

Received on Wednesday, 1 May 1996 18:49:05 UTC