Friday, August 15, 2008

Specifying media: Internal and External Stylesheets

You can specify different style sheets for different display devices (called media). For internal style sheets that are loaded using the <link> element, you can specify the media using the media attribute. To specify more than one media, separate them with commas. For example:
<link rel="stylesheet" type="text/css" href="styles.css" media="screen, print" />
For internal style sheets that are loaded using the <style> element and the @import directive, you can specify the media as below:
<style type="text/css">
@import url(styles.css) screen, projection;
</style>

different media

all
applies to all media
aural
for speech synthesizers and screen readers
braille
for Braille devices
embossed
for Braille printers
handheld
for handheld devices like PDA's and mobile phones
print
used when printing the web page
projection
used with projectors
screen
use with computer screen
tty
used with media with a fixed-pitch character grid
tv
used by televisions

No comments: