Media query tests - types

Back to index.

CSS4 description; unchanged from CSS3.

The media type theoretically says something about your device, but in practice doesn’t make the distinctions we’re looking for.

The only type that works properly is print. You can actually use it to define styles for printed Web pages. So we keep that one. I haven’t researched the aural- or braille-related types. The others, notably handheld and tv, don’t work.

Consider handheld. You’d say it would denote mobile phones, and that’s indeed exactly how it started out. However, the handheld media type was then used to serve up crappy, simplistic styles, which were tailored to the phones of the mid-noughties. When modern smartphones came out they supported proper CSS, and didn’t want to be associated with the crappy handheld styles. That’s why they do not suppor this media type any more (except for Symbian WebKit).

Internet-enabled TVs turn out not to support the tv type. I’m not sure why not; maybe it’s for fear of being served simplistic styles, or maybe because the TV vendors just didn’t think of it. In any case, you can’t detect TVs by type.