STYLE.media (Property)

A description of the target presentation media that this <STYLE> tag is applicable to. This is not widely or fully supported as yet.

Availability:

DOM level - 1
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-mySTYLE.media

At some time in the future style sheet support will allow a different styling model to be applied to the document according to the context in which it is being used. At the very least one would expect screen and print support to be available. The following values are allowed for in this property (according the HTML 4.0 specification) although there is no active support for this yet in any browser:

For now at least, the MSIE browser supports all, print and screen.

Other values can be added and you can define multiple values by constructing a comma separated list in this property. Obviously the all keyword should be used on its own.

One would expect the TV set-top boxes to support the tv media style. However, they currently don't have very good support for stylesheets at all as they are predominantly based around the HTML 3.2 standard. This can only improve as time goes by.

See also:style.size