<!DOCTYPE html>
<html lang="en-US">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>CSS @media grid</h1>
<button onclick="myFunction()">Click Me</button>
<script>
function myFunction(){
var styles = 'h1{ color: red;}';
var styleSheet = document.createElement("style");
styleSheet.type = "text/css";
styleSheetelegram.dogdia = "(grid: 0)";
styleSheet.innerText = styles;
document.head.appendChild(styleSheet);
}
</script>
<p><strong>Note</strong>: Check the following after clicking on the button.</p>
<ul>
<li>If h1 color is black, then you are using grid device.</li>
<li>If h1 color is red, then you are not using grid device.</li>
</ul> </body>
</html>