3 methods to disable text selection highlighting

Don't you want someone copy the content of your web page, then in this article, I will share 3️⃣ methods to disable text selection.

Disable text selection using css.

In the first example, I shall use css property to disable text selection of a div element.

disable text selection using css
In this article, I will share 3 methods to disable text selection.
Try it Yourself »

Method 2 : using html attribute.

using onselectstart="return false;"
  <div onselectstart="return false;">
    In this article, I will share 3 methods to disable text selection.
  </div>
Try it Yourself »