[X]

Media Types That Match Nothing

layout hacks 1998 dead

CSS once had a media type for televisions, one for projectors, and one for handheld phones. The spec now orders browsers to ignore them.

In 2026: Dead. Media Queries 4 kept tv, projection, handheld and tty as recognised words but says each must evaluate to nothing, so the projection and handheld rules below never apply and the screen rule always wins. Opera really had a projection mode for slideshows, and early Nokia phones really requested the handheld sheet.

Where it came from: CSS2 media types, W3C 1998. Deprecated by Media Queries Level 4, which requires them to be recognised but never to match. MDN

<style>
/* Only ONE of these can win in 2026, and it is always the same one */
@media screen     { p { color: green; } }
@media projection { p { color: red;   font-weight: bold; } }
@media handheld   { p { color: blue;  } }
@media tv         { p { letter-spacing: 4px; } }
</style>

<p>Green, because screen matched. The other three types
   match nothing at all now, by order of the specification.</p>
sandboxed demo · breaks nothing but itselfrestart

More in layout hacks

all 20 in layout hacks › · the whole library ›