<html>
<head>
<style>
@media screen {
body {
color: green;
}
}
@media print {
body {
color: black;
}
}
</style>
</head>
<body>
<h1>The @media Rule</h1>
<p>Use mediaqueries to set the text color to green when the document is displayed on the screen, and to black when it is printed.</p>
</body>
</html>