# Description

The @media parser directive is used to indicate that one or more rule sets apply to specific media types.

The rules that apply to the specicified media type must be contained within the `media` block.

This directive has the form:

    @media media_type,... {
      rules
    }

# Media Types

This table lists the different media types for this directive:

Value | Description
--- | ---
all | All devices
aural | Speech and sound synthesizers
braille | Braille tactile feedback devices
embossed | Pages braille printers
handheld | Small/handheld devices
print | Print devices
projection | Projection devices
screen | Computer screens
tty | Teletypes or terminals
tv | Television-type devices

# Examples

This example set the background color to `red` for screen media, and `black` for print media.

    @media screen {
      body {
        background-color:red;
      }
    }

    @media print {
      body {
        background-color:black;
      }
    }

# Browser Support

Firefox | IE | Chrome | Opera | Safari

# Miscellaneous Information

Defined In: | CSS2