Quackit Logo

Got a MySpace Page?

Get "www.yourname.com" for your MySpace page. Learn how >>.

CSS Media Types

Print Version

You can use CSS to change the appearance of your web page depending on the media type that's viewing it. For example, you can specify one font for when your web page is viewed on a computer screen and another for when it's viewed with a handheld device or braille device.

Recognized CSS media types:

Media TypeDescription
allFor all media type devices.
auralFor speech synthesizers
brailleFor braille tactile feedback devices
embossedFor paged braille printers
handheldFor handheld devices
printFor printed versions and print preview on the screen.
projectionFor projected presentations such as projectors and transparencies.
screenComputer screens.
ttymedia using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities.
tvTelevision-type devices

There are two methods for creating separate styles depending on the media type:

  • Use the @media rule. For example:
    @media print
    {
    p.bodyText {font-family:georgia, times, serif;}
    }
    
  • Use the Media attribute when linking to an external style sheet. For example:
    <LINK rel="stylesheet" type="text/css"
    	 media="TV" href="/css/tv_version.css">
    

To see how the media type can be used to separate the print styles from the screen styles, view the CSS Print Version page.

Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
                     
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!

FREE Hosting!

With every domain name you register with ZappyHost, you get FREE (ad supported) hosting.

PLUS you get:

  • FREE Website Builder
  • FREE Blog
  • FREE Starter Web Page
  • FREE Email Account
  • & much more! (Total value $123 for FREE!)
Get your FREE hosting today! >>