HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> @media (monochrome){ h1{ color: green; } } @media (monochrome: 0){ h1 { color: red; } } </style> </head> <body> <h1>CSS @media monochrome</h1> <p><strong>Note</strong>: Check the following</p> <ul> <li>If h1 color is green, then your device is a monochrome device.</li> <li>If h1 color is red, then your device is not a monochrome device.</li> </ul> </body> </html>
OUTPUT
×

Save as Private