JS CSS

CREATE UNSELECTABLE TEXT IN CSS JS

<style> .nohigh { user-select: none; } .nohigh::selection { background: transparent; }  </style>    <p class="nohigh"> You shall not highlight this block of text! </p>

CSS USER  SELECT NONE

01

<p class="nohigh"> You shall not highlight this block of text! </p>   <script> var all = document. getElementsByClassName("nohigh"); for (let a of all) {   a.onselectstart = () => { return false; } } </script>

JAVASCRIPT NO SELECT

02