Name

MEDIA — NN n/a IE 4 HTML 4

Synopsis

MEDIA=”descriptorList"

Optional

Sets the intended output device for the content of the element. The MEDIA attribute looks forward to the day when browsers are able to tailor content to specific kinds of devices such as pocket computers, text-to-speech digitizers, or fuzzy television sets. The HTML 4.0 specification defines a number of constant values for anticipated devices, but the list is open-ended, allowing future browsers to tailor output to yet other kinds of media and devices.

Example

<STYLE TYPE="text/css"  MEDIA="print">...</STYLE>

Value

Case-sensitive constant values. Multiple values can be grouped together in a comma-delimited list within a quoted string. Values defined in HTML 4.0 are all | aura | braille | handheld | print | projection | screen | tty | tv. Internet Explorer values are all | print |screen.

Default

screen

Object Model Reference

IE

[window.]document.all.tags(“STYLE”)[i].media

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.