How to specify the target media types of a set of CSS rules


The media attribute on the Link element specifies the target media of an external style sheet −

Example

<style>

   <!--
      <!doctype html public "-//w3c//dtd html 4.0//en">

      <html>

         <head>
            <title>link to a target medium</title>
            <link rel="stylesheet" type="text/css" media="print, handheld" href="foo.css">
         </head>

         <body>
            <p>the body...
         </body>

      </html>
   -->
</style>

Updated on: 16-Mar-2020

104 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements