Re: Generic Markup

Bert Bos (bbos@mygale.inria.fr)
Wed, 14 Aug 1996 23:41:45 +0200 (MET DST)


Date: Wed, 14 Aug 1996 23:41:45 +0200 (MET DST)
Message-Id: <199608142141.XAA29645@mygale.inria.fr>
From: Bert Bos <bbos@mygale.inria.fr>
To: www-html@w3.org, www-style@w3.org
Subject: Re: Generic Markup
In-Reply-To: <199608142054.WAA29518@mygale.inria.fr>
 <199608142054.WAA29518@mygale.inria.fr>

I wrote:
 > Keith M. Corbett writes:
 >  > At 01:12 AM 8/14/96 GMT, Gavin Nicol wrote:
 >  > >>        Yesterday: <subhed> --> <p><b>
 >  > >>        Today:     <subhed> --> <p class="subhed"><b>
 [...]
 >  > >> 
 >  > 
 >  > Somehow I missed the beginning of this exchange. I wonder if the author of
 >  > this message you quoted should consider something like:
 >  > 
 >  >   <p><b><subhed class="subhed">...</subhed></b></p>
 >  > 
 >  > This is slightly different from, or should be slightly different from:
 >  > 
 >  >   <p><subhed class="subhed"><b>...</b></subhed></p>
 >  > 
 >  > Does anyone know if this "works" in MSIE or Arena?
 >  > 
 >  > Seems to me this technique would allow browsers who conform to CSS to format
 >  > the paragraph correctly, while allowing the author to preserve structural
 >  > integrity etc etc.
 >  > 
 >  > Seems to me that this technique should work. CSS doesn't mandate any
 >  > particular tag set for HTML, and assuming the CSS inheritance stuff works,
 >  > one should be able to invent tags for this purpose. Or am I missing
 >  > something about CSS?
 > 
 > It doesn't attach a style to the element, because HTML specifies that
 > unknown tags should be skipped during parsing. The CSS formatter never
 > even gets to see them.

That reply was a bit short. To clarify: No, there is nothing in CSS
itself that prohibits this technique. Given a parser that passes the
right information to the formatter (at least element name and class
value), CSS is able to handle any element.

In that sense, <P class=subhed> is equivalent to <subhed>, except that
the stylesheet writer looses the benefit of subclassing, which allows
SUBHED to share most of the style rules with P.


Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/pub/WWW/People/Bos/                      INRIA/W3C
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 93 65 77 71                 06902 Sophia Antipolis Cedex, France