Link media-specific CSSs to a topic and add media attributes in HTML

Create different CSSs, link to a topic, and edit the HTML code to add a media attribute in the link tag.

Syntax of the link tag

<link rel="StyleSheet" href="<stylesheet_filename>" type="text/css" media="<media_type>"/>

Examples

<link rel="StyleSheet" href="screen.css" type="text/css" media="screen"/>
<link rel="StyleSheet" href="print.css" type="text/css" media="print"/>

note:    The above examples specify that screen.css and print.css are used for output for display computer screens and printers, respectively. The media attribute requires predefined values, such as screen, print, projection, and handheld.


September 30, 2016

Legal Notices | Online Privacy Policy