The LINK element |
In this example, we first specify a persistent style sheet located in the file mystyle.css:
<LINK href="mystyle1.css" rel="stylesheet" type="text/css">
Setting the title attribute makes this the author's preferred style sheet:
<LINK href="mystyle2.css" title="compact" rel="stylesheet" type="text/css">
Adding the keyword "alternate" to the rel attribute makes it an alternate style sheet:
<LINK href="mystyle3.css" title="mystyle3" rel="alternate stylesheet" type="text/css">
<LINK href="mystyle4.css" title="mystyle4" rel="alternate stylesheet" type="text/css">
style one is active
style two is active
style three is active
style four is active
Using media types to take advantage of the characteristics of the media where the document is to be rendered:
<link rel=stylesheet media="screen" href="website.css">
<link rel=stylesheet media="print" href="printer.css">
<link rel=stylesheet media="aural" href="speaker.css">
web style is active
speaker style is active
printer style is active
If this text is not in orange and has a background image then the @import url(mystyle5.css); command failed
Back one step.
last updated on 4/13/2011 12:31:37 PM