Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of HTML media attribute</title> <link rel="stylesheet" media="all" href="/examples/css/common.css"> <link rel="stylesheet" media="screen" href="/examples/css/screen.css"> <link rel="stylesheet" media="print" href="/examples/css/print.css"> </head> <body> <h1>Media Dependent Style Sheets Using the <code><link></code> Element</h1> <p>If you print (or print preview) this page the output of HTML code appears differently than it appears on the screen. Because different style sheets are used for different media types i.e. screen.css for computer screen while print.css for print media.</p> </body> </html>