david wrote: > Jukka K. Korpela wrote: >> Tudor Hariton wrote: >> >>> If you use CSS the sequence /*<font face="Helvetica" size="3"> >>> */must not be written in you html code... >> >> That's incorrect. The use of CSS does not affect the least the issue >> what you are allowed to write in your HTML code. Some people and >> organizations, including the W3C, say that you should not use such >> presentational markup and should use CSS instead, but this is _not_ a >> "must not" thing and it's not _because_ of the use of CSS. > > Jukka, it is *very* correct.
No, it is not correct at all. There is no such requirement anywhere. > If you want the CSS to change the font > face of a paragraph, *you cannot have a <font> tag inside it setting > the font.* Of course I can. And this was not about changing the font face; the statement made was "If you use CSS,..." without saying what is being done in CSS. > Browsers render things according to the > *most specific rendering instructions* that apply at a given point in > a document That's not true. You cannot simplify the cascade rules that way. > - and *nothing* is more specific than a font tag enclosing > a piece of text. A font tag is not CSS at all, though it may get internally mapped to a CSS rule. By the specifications, browsers _may_ honor presentational markup by mapping it to CSS rules in a certain way. If this happens (and it does, in practice), this results in a CSS rule with specificity 0 (zero), i.e. the _lowest_ specificity. See http://www.w3.org/TR/CSS21/cascade.html#preshint If a paragraph contains <font face="Helvetica" size="3">...</font>, then setting p { font-family: Courier New; } would not affect the text inside the <font> element, but that's because the <font> element has its font-family set, so it does not inherit it from its parent. Setting p, font { font-family: Courier New; } or simply * { font-family: Courier New; } would set the <font> element's font-family, too. (You don't need !important here. You would need it if you wanted to override the effect of <font> markup in your _user_ style sheet, but that's just because author style sheet "wins" a user style sheet, other things being equal, and !important reverts this.) So there's no truth in the statement that you cannot change the font in CSS if you are using <font> markup. You just need to remember that <font> markup is treated as creating _elements_, and elements don't inherit a property if anything sets the property for the element. Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
