CSS Media Types


CSS Tutorial  >  Media Types

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]">

Embed
<style type="text/css" media="[media type]">

Import
@import url("style.css") [media type];

where possible values for [media type] include the following:

ValueSuitable For
allAll devices.
auralSpeech synthesizers.
brailleBraille tactile feedback devices.
handheldhandheld devices.
printmaterial to be printed.
projectionProjected presentations.
screenComputer screens.
ttyMedia using a fixed-pitch character grid.
tvTV-type devices.


Next: CSS Cascade

Link to this page: If you find this page useful, we encourage you to link to this page. Simply copy and paste the code below to your website, blog, or profile.



More Tutorials:   SQL   PHP   HTML


Copyright 2007-2009   1keydata.com   All Rights Reserved.   Privacy Policy  



CSS Tutorial
CSS Syntax
Apply CSS
CSS Media Types
CSS Cascade
CSS Inheritance
CSS Class ID
CSS Div Span
CSS Length Units

CSS Box Model
CSS Margin
CSS Border
CSS Padding
CSS Background
  CSS Background-attachment
  CSS Background-color
  CSS Background-image
  CSS Background-position
  CSS Background-repeat
CSS Color
CSS Font
CSS Link
CSS List
CSS Table
CSS Position
  CSS Absolute
  CSS Relative
  CSS Fixed
  CSS Static
  CSS Top
  CSS Bottom
  CSS Left
  CSS Right
  CSS Overflow
  CSS Z-Index
CSS Text
CSS Float
CSS Clear
CSS Cursor
CSS Wrap

CSS Codes

Resources

CSS Tutorial German