One can apply different CSS stylesheets for different media types (devices). For example, a stylesheet can be applied when a document is rendered on the screen, and a different stylesheet can be applied when that same document is to be printed. The syntax for specifying the media type for a stylesheet is as follows:
External Link
<link rel="stylesheet" href="style.css" type="text/css" media="[media type]">
<link rel="stylesheet" href="style.css" type="text/css" media="[media type]">
Embed
<style type="text/css" media="[media type]">
<style type="text/css" media="[media type]">
Import
@import url("style.css") [media type];
@import url("style.css") [media type];
where possible values for [media type] include the following:
| Value | Suitable For |
| all | All devices. |
| aural | Speech synthesizers. |
| braille | Braille tactile feedback devices. |
| handheld | handheld devices. |
| material to be printed. | |
| projection | Projected presentations. |
| screen | Computer screens. |
| tty | Media using a fixed-pitch character grid. |
| tv | TV-type devices. |








0 comments:
Post a Comment