Alternate Style Sheets (How do specify a default?)

moniquedbabin79

New Member
Messages
15
Reaction score
0
Points
0
Hello all,

I am considering adding an alternate style sheet to my new web site (first-ever web site . . . . I'm a newbie!), and I'm not quite sure how to handle the alternate style sheets. I want to make sure that most (preferably all) browsers will understand my default preferences.

Here's the scenario:
imagine that I have already saved two separate style sheets, one named "main.css" and another named "alternate.css"

Then, in the head of my .htm documents, I am going to include the following link elements:

<link href="main.css" rel="stylesheet" type="text/css" title="Regular Text" />
<link href="alternate.css" rel="alternate stylesheet" type="text/css" title="Large Text" />

My textbook states that
"browsers that support alternate style sheets provide a menu option for the user to select which style sheet to apply," but it doesn't state what happens with browsers that don't support alternate style sheets.

In the scenario that I present above, will pretty much any browser default to the first link that I present?

I appreciate any advice on this that you have to offer. I think it's probably good these days to know how to provide alternate styles. I'm guessing that if I stick with this, I will have to learn how to develop a PDA style and many others . . . .

Thanks so much for your time! :)

Cheers,
M. Babin
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Yes, style sheets that aren't specified as alternates are picked by default, no matter whether or not the browser supports alternates. Some browsers simply ignore alternate style sheets.

If you want to know what's supposed to happen, go to the standards documents. Read § 14.3.1 of the CSS standard, "Preferred and alternate style sheets", for more. Read also "Alternative Style Sheets".
 

moniquedbabin79

New Member
Messages
15
Reaction score
0
Points
0
Thank you so much! These links provide wonderful explanations. I should have thought to check W3C but I am still so new to all this. W3C has such great information and tutorials, and this forum is great too!

Thanks, again, for your help!

Cheers,
M. B.
 
Last edited:
Top