<html>
<body>
<p>Click the "Try it" button to set the user-select property of the p element to "none":</p>
<button onclick="myFunction()">Try it</button>
<p id="demo">After you click on the button, it is not possible to select the text of this p element (try to double-click me before and after).</p>
<script>
function myFunction() {
const x = document.getElementById("demo");
x.style.userSelect = "none";
}
</script>
</body>
</html>