Re: Various Niggling CSS1 Questions

Hakon Lie wrote:
> Eric A. Meyer writes:
> 
>  > 1. Should CSS1 implementations take the FONT tag into account?  For
>  > example, if I set the rule "BODY {font: 12pt serif;}", then tags like
<FONT
>  > size="+2"> will have no visual effect-- everything will be 12pt serif.
> 
> The CSS1 spec leaves the question unanswered -- UAs may or may not
> take it into account. If they do take FONT into account, CSS1
> specifies where in the cascade the rules should be put.

Seems to me the safest markup until CSS1 support is commonplace would be a
STYLE declaration in the FONT tag:

  <FONT size="+2" STYLE="font: 12pt serif">

From 3.2 of the Recommendation:

"The UA may choose to honor other stylistic HTML attributes, for example
'ALIGN'. If so, these attributes are translated to the corresponding CSS rules
with specificity equal to 1. The rules are assumed to be at the start of the
author style sheet and may be overridden by subsequent style sheet rules. In a
transition phase, this policy will make it easier for stylistic attributes to
coexist with style sheets."

In the above example, the STYLE declaration will take precedence over the size
attribute. So whether or not a CSS1-supporting UA chooses to honor other
stylistic HTML attributes, the CSS1 markup will still be displayed.

David Perrell

Received on Wednesday, 24 September 1997 17:13:32 UTC