
Joshua Hutchinson wrote:
You can define a virtually unlimited number of styles, one after another, in the beginning of your HTML file. Firefox will default to the first one, but you can switch on the fly under the View -> Page Style menu.
Just to make it more frustrating, IE picks the LAST style out of the list to display. *rolls eyes*
Disclaimer: I may have the first and last backwards. Firefox may pick the last and IE the first. I just know they never AGREE on which one to display by default.
The HTML 4 Rec, at http://www.w3.org/TR/html4/present/styles.html#h-14.3.1 talks about multiple mutually exclusive style sheets, of which one can be 'preferred'. (Browsers should apply the preferred style sheet, if the user hasn't selected a different one.) However, the syntax by which the author specifies the preferred style sheet appears to only apply to *external* style sheets, referenced via <LINK> elements. Marcello Perathoner wrote:
<HEAD> <STYLE type="text/css" title="red"> P { color: red } </STYLE> <STYLE type="text/css" title="blue"> P { color: blue } </STYLE> <STYLE type="text/css" title="green"> P { color: green } </STYLE> </HEAD> <BODY> <P>Don't show this to any DP Project Manager. </BODY>
For *internal* style sheets, defined within <STYLE> elements as above, it seems to me that the Rec is silent on the meaning/significance of attaching a 'title' attribute to a STYLE element. And even more silent on the significance of multiple such elements. (Or how they should interact with external style sheets.) As far as I can tell, this also applies to versions of XHTML up to 2.0. -Michael Dyck