Definition and Usage
The media property sets or returns the device on which the document is displayed.
For style information, the target medium is very important. Styles may be different for mobile devices and desktop computers.
Example
<html> <head> <link rel="stylesheet" type="text/css" media="screen" id="id" href="css.css" /> </head> <body> <script type="text/javascript"> x=document.getElementById("id""); document.write("Intended media type=" + x.media); </script> </body> </html>