Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Attribute for <LINK ...>
MEDIA = SCREEN | PRINT | PROJECTION | AURAL | BRAILLE | ALL | other media

MEDIA indicates which type of media the link applies to. The default is ALL, which means that the link applies to any media.

MEDIA is commonly used to set the appearance of the page for when it is printed. Because links in the page are no use when the page is printed you can use MEDIA and styles to make the printed links look like normal text.

First, create a file for the print-only styles. Let's call it printonly.css. Type the following code into the file:

A{text-decoration:none}
A:link{color:black}
A:visited{color:black}

Now, in your web page, in the <HEAD> section, put this <LINK ...> tag:

<LINK REL=STYLESHEET HREF="printonly.css" MEDIA=PRINT>

This gives us a web page like this.

MEDIA can be set to a list of values. Separate each media type with a comma. Be sure to put quotes around the list. So, for example, the following code indicates that the styles apply to print or to projection:

<LINK REL=STYLESHEET HREF="printonly.css" MEDIA="PRINT,PROJECTION">

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire