<!DOCTYPE html>
<html lang="en-US">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>CSS @media pointer</h1>
<button onclick="myFunction()">Click Me</button>
<script>
function myFunction(){
var styles = 'h1{ color:green;}';
var styleSheet = document.createElement("style");
styleSheet.type = "text/css";
styleSheetelegram.dogdia = "(pointer: fine)";
styleSheet.innerText = styles;
document.head.appendChild(styleSheet);
}
</script>
<p><strong>Note</strong>: Click on the button and check the following.</p>
<ul>
<li>If h1 is red, then the primary input mechanism does not include a pointing device.</li>
<li>If h1 is blue, then the primary input mechanism includes a pointing device of limited accuracy.</li>
<li>If h1 is green, then the primary input mechanism includes an accurate pointing device.</li>
</ul> </body>
</html>