MediaDesc Attribute Type


 

The MediaDesc Attribute Type is a data type defined by XHTML Modularisation 1.1, declared in the DTD as XML 1.0 type CDATA.
Reference: *W3C - XHTML Modularisation 1.1 - Attribute Types

Specific Attributes with Type MediaDesc

  1. media:
    This is declared on the elements: link, style

Common Attributes with Type MediaDesc

There are no Common Attributes with type MediaDesc.


Attribute Value for Type MediaDesc

A comma-separated list of one or more recognised media descriptors, e.g. "all", "screen", "screen, print"

The MediaDesc Attribute Type is used for specifying the media types for which the resource is applicable, e.g. for the style element the media attribute (of type MediaDesc) indicates the media types for which the relevant styles apply.

For example:

<link rel="stylesheet" type="text/css" media="print" href="printstyle.css" />
  
<style type="text/css" media="screen">
    body { color:#000; background:#fff url(bg.jpg) top left no-repeat }
</style>

The first example indicates that the style sheet "printstyle.css" is for printed pages only, whereas the second implies that the rules within the style element should be used for display on computer screens only.

Valid media descriptors

The following list of recognised media descriptors is adapted from the entry for MediaDesc under the W3C's *XHTML 1.1 Modularisation - Attribute Types, whilst also taking into account the *CSS 2.1 list of Recognised Media Types.

all
To be used for all devices
screen
To be used for computer monitors
print
To be used for printed pages
handheld
To be used for handheld devices with small screens
tv
To be used for televisions
projection
To be used for projectors
tty
To be used for teletype terminals
braille
To be used for braille tactile devices
embossed
To be used for paged braille printers
speech
To be used for speech synthesizers - reserved by CSS2.1, but without defined properties (see *CSS2.1: The media types 'aural' and 'speech')
aural
To be used for speech synthesizers, but is now deprecated in CSS 2.1 (see *CSS2.1: The media types 'aural' and 'speech')

Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > Data Types in XHTML 1.1 > Attribute Types (XHTML 1.1) > MediaDesc Attribute Type